org.apache.xpath.compiler
Class XPathParser
java.lang.Object
|
+--org.apache.xpath.compiler.XPathParser
- public class XPathParser
- extends java.lang.Object
- implements java.io.Serializable
Tokenizes and parses XPath expressions. This should really be named
XPathParserImpl, and may be renamed in the future.
- See Also:
- Serialized Form
Constructor Summary |
XPathParser()
The parser constructor. |
Method Summary |
ErrorHandler |
getErrorHandler()
Return the current error handler. |
void |
initMatchPattern(Compiler compiler,
java.lang.String expression,
PrefixResolver namespaceContext)
Given an string, init an XPath object for pattern matches,
in order that a parse doesn't
have to be done each time the expression is evaluated. |
void |
initXPath(Compiler compiler,
java.lang.String expression,
PrefixResolver namespaceContext)
Given an string, init an XPath object for selections,
in order that a parse doesn't
have to be done each time the expression is evaluated. |
void |
setErrorHandler(ErrorHandler handler)
Allow an application to register an error event handler. |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
XPathParser
public XPathParser()
- The parser constructor.
initXPath
public void initXPath(Compiler compiler,
java.lang.String expression,
PrefixResolver namespaceContext)
throws SAXException
- Given an string, init an XPath object for selections,
in order that a parse doesn't
have to be done each time the expression is evaluated.
- Parameters:
compiler
- The compiler object.expresson
- A String representing the OpMap.namespaceContext
- An object that is able to resolve prefixes in
the XPath to namespaces.
initMatchPattern
public void initMatchPattern(Compiler compiler,
java.lang.String expression,
PrefixResolver namespaceContext)
throws SAXException
- Given an string, init an XPath object for pattern matches,
in order that a parse doesn't
have to be done each time the expression is evaluated.
- Parameters:
compiler
- The XPath object to be initialized.expresson
- A String representing the XPath.namespaceContext
- An object that is able to resolve prefixes in
the XPath to namespaces.
setErrorHandler
public void setErrorHandler(ErrorHandler handler)
- Allow an application to register an error event handler.
getErrorHandler
public ErrorHandler getErrorHandler()
- Return the current error handler.
Copyright © 2000 Apache XML Project. All Rights Reserved.