Returns the nodes resulting from executing an XPath query upon the receiver.
- macOS 10.4+
A string that expresses an XPath query.
If query errors occur, indirectly returns an
NSErrorobject describing the errors.
An array of
NSXMLNode objects that match the query, or an empty array if there are no matches.
The receiver acts as the context item for the query (“.”). If you have explicitly added adjacent text nodes as children of an element, you should invoke the
normalize (with an argument of
NO) on the element before applying any XPath queries to it; this method coalesces these text nodes. The same precaution applies if you have processed a document preserving CDATA sections and these sections are adjacent to text nodes.