org.apache.xerces.impl.xpath

Class XPath

Known Direct Subclasses:
Field.XPath, Selector.XPath

public class XPath
extends java.lang.Object

Bare minimum XPath parser.
Version:
$Id: XPath.java 388860 2006-03-25 23:50:16Z mrglavas $
Author:
Andy Clark, IBM

Nested Class Summary

static class
XPath.Axis
Axis.
static class
XPath.LocationPath
A location path representation for an XPath expression.
static class
XPath.NodeTest
Node test.
static class
XPath.Step
A location path step comprised of an axis and node test.

Field Summary

protected String
fExpression
Expression.
protected XPath.LocationPath[]
fLocationPaths
Location paths.
protected SymbolTable
fSymbolTable
Symbol table.

Constructor Summary

XPath(String xpath, SymbolTable symbolTable, org.apache.xerces.xni.NamespaceContext context)
Constructs an XPath object from the specified expression.

Method Summary

XPath.LocationPath
getLocationPath()
Returns a representation of the first location path for this XPath.
XPath.LocationPath[]
getLocationPaths()
Returns a representation of all location paths for this XPath.
static void
main(String[] argv)
Main program entry.
String
toString()
Returns a string representation of this object.

Field Details

fExpression

protected String fExpression
Expression.

fLocationPaths

protected XPath.LocationPath[] fLocationPaths
Location paths.

fSymbolTable

protected SymbolTable fSymbolTable
Symbol table.

Constructor Details

XPath

public XPath(String xpath,
             SymbolTable symbolTable,
             org.apache.xerces.xni.NamespaceContext context)
            throws XPathException
Constructs an XPath object from the specified expression.

Method Details

getLocationPath

public XPath.LocationPath getLocationPath()
Returns a representation of the first location path for this XPath.

getLocationPaths

public XPath.LocationPath[] getLocationPaths()
Returns a representation of all location paths for this XPath. XPath = locationPath ( '|' locationPath)

main

public static void main(String[] argv)
            throws Exception
Main program entry.

toString

public String toString()
Returns a string representation of this object.

Copyright B) 1999-2006 The Apache Software Foundation. All Rights Reserved.