I\'m trying to extract the contents of the \'coordinates\' node in this KML file using xmlstarlet.
The KML file validates fine using xmlstarlet itself.
I\'ve
You need to define and use a namespace prefix for http://earth.google.com/kml/2.2 test.kml
- something like this:
xmlstarlet sel -t -c "//kml:coordinates/text()" -N kml=http://earth.google.com/kml/2.2 test.kml
XPaths do not have a default namespace - if a name in a XPath does not specify a namespace prefix it is assumed to be in the null namespace; hence it is necessary to always specify a namespace prefix when trying to match nodes whose names are in a namespace different from the null one (as in this case).