The System.XPath module contains an implementation of the XML Path Language version 1.0 query engine.
Consider the following XML document:
<philosophers>
<philosopher name='Plato'/>
<philosopher name='Aristotle'/>
<philosopher name='Socrates'/>
</philosophers>
and the following XPath query string:
"/philosophers/philosopher" .
This example program evaluates the previous query and prints the names of all three philosophers: Plato, Aristotle and Socrates. The query selects all child elements having the name 'philosopher' under the document element having the name 'philosophers' from the given XML document.
If the query is changed to "/philosopher/philosopher[@name='Socrates']" , only a single 'philosopher' child element that has an attribute with name 'name' and value 'Socrates' is selected. Thus this program prints Socrates.
XPATH Lexical Grammar |
XPATH Grammar |
System | |
XPath | |
XPathKeywords | |
XPathTokens |
public static class | XPathClassMap |
public class | XPathLexer |
public static class | XPathParser |