public class XPathProcessor extends Object implements Serializable
| Modifier and Type | Method and Description |
|---|---|
String |
evaluate(InputStream content)
Evaluate the content with the XPath expression specified when creating the XPathProcessor
and return a serialized response.
|
String |
evaluate(String content)
Evaluate the content with the XPath expression specified when creating the XPathProcessor
and return a serialized response.
|
String |
evaluateStream(InputStream content)
Evaluate the content with the XPath expression specified when creating the XPathProcessor
and return a serialized response.
|
String |
evaluateString(String content)
Evaluate the content with the XPath expression specified when creating the XPathProcessor
and return a serialized response.
|
boolean |
filter(InputStream content)
Filter the content with the XPath expression specified when creating the XPathProcessor.
|
boolean |
filter(String content)
Filter the content with the XPath expression specified when creating the XPathProcessor.
|
boolean |
filterStream(InputStream content)
Filter the content with the XPath expression specified when creating the XPathProcessor.
|
boolean |
filterString(String content)
Filter the content with the XPath expression specified when creating the XPathProcessor.
|
static XPathProcessor |
getInstance(String xPathExpression)
Get an instance of XPathProcessor.
|
static XPathProcessor |
getInstance(String xPathExpression,
HashMap<String,String> namespaceMappings)
Get an instance of XPathProcessor.
|
static XPathProcessor |
getInstance(String xPathExpression,
HashMap<String,String> namespaceMappings,
HashMap<String,Object> featureMappings)
Get an instance of XPathProcessor.
|
void |
setOutputMethod(String method)
Set the output method (the default is xml).
|
public static XPathProcessor getInstance(String xPathExpression) throws XPathException
xPathExpression - XPath expression to apply to the contentXPathExceptionpublic static XPathProcessor getInstance(String xPathExpression, HashMap<String,String> namespaceMappings) throws XPathException
xPathExpression - XPath expression to apply to the contentnamespaceMappings - Namespace prefix to Namespace uri mappingsXPathExceptionpublic static XPathProcessor getInstance(String xPathExpression, HashMap<String,String> namespaceMappings, HashMap<String,Object> featureMappings) throws XPathException
xPathExpression - XPath expression to apply to the contentnamespaceMappings - Namespace prefix to Namespace uri mappingsfeatureMappings - Processor feature mappingsXPathExceptionpublic void setOutputMethod(String method)
method - public boolean filter(String content) throws XPathException
content - String to which the XPath expression will be appliedXPathExceptionpublic boolean filterString(String content) throws XPathException
content - String to which the XPath expression will be appliedXPathExceptionpublic boolean filter(InputStream content) throws XPathException
content - InputStream to which the XPath expression will be appliedXPathExceptionpublic boolean filterStream(InputStream content) throws XPathException
content - InputStream to which the XPath expression will be appliedXPathExceptionpublic String evaluate(String content) throws XPathException
content - String to which the XPath Expression will be evaluatedXPathExceptionpublic String evaluateString(String content) throws XPathException
content - String to which the XPath Expression will be evaluatedXPathExceptionpublic String evaluate(InputStream content) throws XPathException
content - InputStream to which the XPath Expression will be evaluatedXPathExceptionpublic String evaluateStream(InputStream content) throws XPathException
content - InputStream to which the XPath Expression will be evaluatedXPathExceptionCopyright © 2018 Elsevier, Inc.. All rights reserved.