public class XPathParser
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CONTINUE_AFTER_FATAL_ERROR |
Constructor and Description |
---|
XPathParser(ErrorListener errorListener,
SourceLocator sourceLocator)
The parser constructor.
|
Modifier and Type | Method and Description |
---|---|
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(ErrorListener handler)
Allow an application to register an error event handler, where syntax
errors will be sent.
|
public static final java.lang.String CONTINUE_AFTER_FATAL_ERROR
public XPathParser(ErrorListener errorListener, SourceLocator sourceLocator)
public void initXPath(Compiler compiler, java.lang.String expression, PrefixResolver namespaceContext) throws 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.TransformerException
public void initMatchPattern(Compiler compiler, java.lang.String expression, PrefixResolver namespaceContext) throws 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.TransformerException
public void setErrorHandler(ErrorListener handler)
handler
- Reference to error listener where syntax errors will be
sent.public ErrorListener getErrorListener()
Copyright © 2014 Apache XML Project. All Rights Reserved.