[gdal-dev] Logics of CPLGetXMLValue and CPLFetchBool

Ari Jolma ari.jolma at gmail.com
Wed Nov 15 05:51:28 PST 2017


Even Rouault kirjoitti 15.11.2017 klo 13:40:

> On mercredi 15 novembre 2017 10:58:23 CET Ari Jolma wrote:
>
>
> >
>
> > Thus the return value of CPLGetXMLBoolean can't use CPLGetXMLValue if it
>
> > follows the logic of CPLFetchBool. That is true is existence and no 
> denial.
>
> >
>
> Why not
>
> CPLGetXMLBoolean(node) == CPLTestBool(CPLGetXMLValue(node,NULL,"NO")) ?
>

Ah, but I want to test with node *and* path. Node will be the top level 
node of the service XML.

Anyway, I think I need to start with

CSLFetchNameValueDef(poOpenInfo->papszOpenOptions

and based on that explicitly set the element value to "TRUE" if the 
option exists and is not false. Then I can rely on the value of the 
element being "TRUE" if it is set.

Ari


> -- 
>
> Spatialys - Geospatial professional services
>
> http://www.spatialys.com
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20171115/5aa1c130/attachment.html>


More information about the gdal-dev mailing list