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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.