The .NET XPath Navigation API

The XML DOM support for XPath expressions has a double goal. First, it smooths the transition from MSXML COM code to the .NET Framework. Second, it gives you a built-in and easy-to-use mechanism to search for nodes in a memory-mapped XML document. As mentioned, the core .NET API for processing XPath expressions is built into a tailor-made class named XPathNavigator.

You access the navigator object either from the XmlDocument class or from the newest XPathDocument class. Figure 6-5 illustrates the relationship between the two ways of accessing XPath functions in the .NET Framework.

Figure 6-5. Applications can access XPath through either XmlDocument or XPathDocument. In both cases, the actual query is performed ...

Get Applied XML Programming for Microsoft® .NET now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.