Skip to content
Prev 172213 / 398506 Next

Need help extracting info from XML file using XML package

Wacek Kusnierczyk wrote:
Just for the record, I the xpath expression in the
second xpathSApply would need to be
    ".//coordinates"
to start searching from the previously matched Polygon node.
Otherwise, the search starts from the top of the document again.

However, it would seem that

   xpathSApply(doc, "//Polygon//coordinates",
                 function(node) strsplit(.....))

would be more direct, i.e. fetch the coordinates nodes in single
XPath expression.

   D.