|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.xpath.compiler.XPathParser
public class XPathParser
Tokenizes and parses XPath expressions. This should really be named XPathParserImpl, and may be renamed in the future.
Field Summary | |
---|---|
static java.lang.String |
CONTINUE_AFTER_FATAL_ERROR
|
Constructor Summary | |
---|---|
XPathParser(javax.xml.transform.ErrorListener errorListener,
javax.xml.transform.SourceLocator sourceLocator)
The parser constructor. |
Method Summary | |
---|---|
javax.xml.transform.ErrorListener |
getErrorListener()
Return the current error listener. |
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(javax.xml.transform.ErrorListener handler)
Allow an application to register an error event handler, where syntax errors will be sent. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String CONTINUE_AFTER_FATAL_ERROR
Constructor Detail |
---|
public XPathParser(javax.xml.transform.ErrorListener errorListener, javax.xml.transform.SourceLocator sourceLocator)
Method Detail |
---|
public void initXPath(Compiler compiler, java.lang.String expression, PrefixResolver namespaceContext) throws javax.xml.transform.TransformerException
compiler
- The compiler object.expression
- A string conforming to the XPath grammar.namespaceContext
- An object that is able to resolve prefixes in
the XPath to namespaces.
javax.xml.transform.TransformerException
public void initMatchPattern(Compiler compiler, java.lang.String expression, PrefixResolver namespaceContext) throws javax.xml.transform.TransformerException
compiler
- The XPath object to be initialized.expression
- A String representing the XPath.namespaceContext
- An object that is able to resolve prefixes in
the XPath to namespaces.
javax.xml.transform.TransformerException
public void setErrorHandler(javax.xml.transform.ErrorListener handler)
handler
- Reference to error listener where syntax errors will be
sent.public javax.xml.transform.ErrorListener getErrorListener()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |