XPath in the XML DOM
In the .NET Framework, you can make use of XPath expressions in two ways: through the XML DOM or by means of a new and more flexible API based on the concept of the XPath navigator.
In the former case, you use XPath expressions to select nodes within the context of a living instance of the XmlDocument class. As we saw in Chapter 5, the XmlDocument class is the .NET Framework class that renders a given XML document as a hierarchical object model (XML DOM). This approach keeps the API close to the old MSXML programming style and has probably been supplied mostly for compatibility reasons.
The alternative approach consists of creating an instance of the XPathDocument class and obtaining from it an XPath navigator object. The ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access