Extract coordinates out of xml with xpath and some criterias



i have spent hours of searching for a solution, but now i need your help. Probably you will joking about me, but...anyway. I'd like to fetch the coordinates and maybe some othe information when xpath matches the crtiteria value=bnb


I tried the syntax //Data/value['bnb']/ancestor::Point/coordinates[text()] with no result.



<Placemark xmlns="">
<name><![CDATA[Malcesine]]></name>
<Point>
<coordinates>10.8103913069,45.7645853643</coordinates>
</Point>
<ExtendedData>
<Data name="tournumber">
<value>1</value>
</Data>
<Data name="guidename">
<value>Lake Garda</value>
</Data>
<Data name="category">
<value>numeration</value>
</Data>
<Data name="category">
<value>bnb</value>
</Data>
<Data name="WayPointNumber">
<value>3</value>
</Data>
</ExtendedData>
</Placemark>
<Placemark xmlns="">
<name><![CDATA[Gelateria Cento per cento]]></name>
<Point>
<coordinates>10.8087927103,45.7659774682</coordinates>
</Point>
<ExtendedData>
<Data name="tournumber">
<value>1</value>
</Data>
<Data name="guidename">
<value>Lake Garda</value>
</Data>
<Data name="WayPointNumber">
<value>3</value>
</Data>
</ExtendedData>
</Placemark>


Thx in advance


No comments:

Post a Comment