Top Description Inners Fields Constructors Methods
org.apache.xerces.impl.xpath

public Class XPath

extends Object
Class Inheritance
Known Direct Subclasses
org.apache.xerces.impl.xs.identity.Field.XPath, org.apache.xerces.impl.xs.identity.Selector.XPath
Imports
java.util.ArrayList, .Vector, org.apache.xerces.util.SymbolTable, .XMLChar, .XMLSymbols, org.apache.xerces.xni.NamespaceContext, .QName

Bare minimum XPath parser.
Author
Andy Clark, IBM
Version
$Id: XPath.java 965250 2010-07-18 16:04:58Z mrglavas $

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
public static class
XPath.LocationPath

A location path representation for an XPath expression.

public static class
XPath.NodeTest

Node test.

private static class
public static class
XPath.Step

A location path step comprised of an axis and node test.

private static class
XPath.Tokens

List of tokens.

Field Summary

Modifier and TypeField and Description
private static final boolean
private static final boolean
private static final boolean
protected final String
fExpression

Expression.

protected final XPath.LocationPath[]
fLocationPaths

Location paths.

protected final SymbolTable
fSymbolTable

Symbol table.

Constructor Summary

AccessConstructor and Description
public
XPath(String xpath, SymbolTable symbolTable, NamespaceContext context)

Constructs an XPath object from the specified expression.

Method Summary

Modifier and TypeMethod and Description
private XPath.LocationPath
buildLocationPath(Vector<E> stepsVector)

Used by the parseExpression(NamespaceContext) method to build a LocationPath object from the accumulated Steps.

private static void
check(boolean b)

Used by the parseExpression(NamespaceContext) method to verify the assumption.

public XPath.LocationPath
getLocationPath()

Returns a representation of the first location path for this XPath.

public XPath.LocationPath[]
getLocationPaths()

Returns a representation of all location paths for this XPath.

public static void
main(String[] argv)

Main program entry.

private XPath.LocationPath[]
parseExpression(final NamespaceContext context)

This method is implemented by using the XPathExprScanner and examining the list of tokens that it returns.

private XPath.NodeTest
parseNodeTest(int typeToken, XPath.Tokens xtokens, NamespaceContext context)

Used by parseExpression to parse a node test from the token list.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of this object.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait