Hi list,

I'm trying to read a complex gml file that includes values that need to be selected on an xml attribute. This is possible to do with a condition in the gfs file, but the example only covers having the attribute on the last element in the elementPath:

https://gdal.org/drivers/vector/gml.html#using-conditions-on-xml-attributes


But mine is on the 2nd last element, like this:

```
        <imaer:result>
            <imaer:Result resultType="DEPOSITION" substance="NH3">
                <imaer:value>0.01909</imaer:value>
            </imaer:Result>
        </imaer:result>
        <imaer:result>
            <imaer:Result resultType="DEPOSITION" substance="NOX">
                <imaer:value>0.001341</imaer:value>
            </imaer:Result>
        </imaer:result>
```

So I'd like to do something like this in my gfs:

```
    <PropertyDefn>
      <Name>nh3</Name>
      <ElementPath>result|Result|value</ElementPath>
      <Condition>result|Result@substance='NH3'</Condition>
      <Type>Real</Type>
    </PropertyDefn>
```

to only catch the value where substance = NH3. I've been trying many options but no success yet.


Is this even possible? And if so, how?

Thanks!
Raymond
_______________________________________________
gdal-dev mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to