Using XPath on single node returns elements in all nodes Using XPath on single node returns elements in all nodes xml xml

Using XPath on single node returns elements in all nodes


When you use //title this searches for all <title> elements starting at the root of the document. Use either simply title to find child titles, or .//title if you want to find titles even if they are nested inside of other elements.


Remove the // from the title xpath expression.