XPath: How to select multiple nodes in different levels?

top_shotta

New Member
Having this (simplified) XML:\[code\]<?xml version="1.0" encoding="UTF-8"?><kml><Document> <Placemark> <name>Poly 1</name> <Polygon> <coordinates> -58.40844625779582,-34.60295278618136,0 </coordinates> </Polygon> </Placemark> <Placemark> <name>Poly 2</name> <Polygon> <coordinates> -58.40414334150432,-34.59992445476809,0 </coordinates> </Polygon> </Placemark></Document></kml>\[/code\]How can I select the name and coordinates of each Placemark?Right now I can select their name with the following XPath expression:\[code\]//Document//Placemark//name\[/code\]How can I select both without any other data?
 
Back
Top