org.exolab.adaptx.xpath.engine
Class Parser
java.lang.Object
org.exolab.adaptx.xpath.engine.Parser
public class Parser
extends java.lang.Object
A class for parsing expression strings
$Revision: 4090 $ $Date: 2004-01-24 02:21:23 +0100 (Sat, 24 Jan 2004) $
createExpr
public static XPathExpression createExpr(String exprString)
throws XPathException
Creates an Expr from the given String
exprString
- the String to create the Expr from
createFunctionCall
public static FunctionCall createFunctionCall(String name)
throws XPathException
Creates the appropriate FunctionCall based on the given name
name
- the name of the function to call
createLiteralExpr
public static XPathExpression createLiteralExpr(String literal)
Creates a literal expression, which simply evaluates
to the given string literal.
literal
- the string literal the literal expression
should evaluate to.
- an XPathExpression which will evaluate to the given
string literal.
createMatchExpr
public static MatchExpression createMatchExpr(String matchString)
throws XPathException
Parses the a pattern String into a MatchExpr
matchString
- the pattern string to create the MatchExpr from
createPathExpr
public static PathExpr createPathExpr(String pattern)
throws XPathException
Creates a PathExpr from the string argument.
pattern
- the string to create the PathExpr from
createSelectExpr
public static SelectExpr createSelectExpr(String selectString)
throws XPathException
Parses the a pattern String into a SelectExpr
selectString
- the pattern string to create the SelectExpr from
createUnionExpr
public static UnionExpr createUnionExpr(String pattern)
throws XPathException
Creates a UnionExpr from the given string argument.
pattern
- the string to create the UnionExpr from