The .NET Framework provides an API through which components can support XPath queries against underlying data stores. To use the XPath API, it’s necessary to understand the XPath language, a discussion of which is beyond the scope of this book. The W3C Recommendation "XML Path Language (XPath) Version 1.0," which is available at www.w3.org/TR/xpath, contains a complete definition of XPath.

This section discusses the .NET Framework classes provided to support XPath. Unless specifically stated otherwise, all XPath classes discussed in this section are members of the System.Xml.XPath namespace.


Components provide XPath support by implementing the IXPathNavigable interface, which defines a single method with the following signature: ...

Get C# for Java Developers now with O’Reilly online learning.

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