System.XPath Module

The System.XPath module contains an implementation of the XML Path Language version 1.0 query engine.

Example

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.

Grammars

XPATH Lexical Grammar
XPATH Grammar

Namespaces

System
XPath
XPathKeywords
XPathTokens

Files

System.XPath/XPathApi.cm
System.XPath/XPathClassMap.cm
System.XPath/XPathContext.cm
System.XPath/XPathDebug.cm
System.XPath/XPathEvaluate.cm
System.XPath/XPathExpr.cm
System.XPath/XPathFunction.cm
System.XPath/XPathKeywords.cm
System.XPath/XPathLexer.cm
System.XPath/XPathLexer.lexer
System.XPath/XPathObject.cm
System.XPath/XPathParser.cm
System.XPath/XPathParser.parser
System.XPath/XPathTokenValueParsers.cm
System.XPath/XPathTokens.cm

Classes

public static class XPathClassMap
public class XPathLexer
public static class XPathParser