Skip to content Skip to sidebar Skip to footer

Python Lxml (objectify): Xpath Troubles

I am attempting to parse an xml document, extracting data using lxml objectify and xpath. Here is a snip of the document:

Solution 1:

/pos/x and /pos/y are absolute XPath expressions and they don't select any element because the provided XML document doesn't have a pos top element.

Try:

pos/x

and

pos/y

Post a Comment for "Python Lxml (objectify): Xpath Troubles"