public class JAXPXPathEngine extends java.lang.Object implements XPathEngine
| Modifier and Type | Field and Description |
|---|---|
private javax.xml.xpath.XPath |
xpath |
| Constructor and Description |
|---|
JAXPXPathEngine()
Create an XPathEngine that uses JAXP's default XPathFactory
under the covers.
|
JAXPXPathEngine(javax.xml.xpath.XPathFactory fac) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
evaluate(java.lang.String xPath,
org.w3c.dom.Node n)
Evaluates an XPath expression and stringifies the result.
|
java.lang.String |
evaluate(java.lang.String xPath,
javax.xml.transform.Source s)
Evaluates an XPath expression and stringifies the result.
|
java.lang.Iterable<org.w3c.dom.Node> |
selectNodes(java.lang.String xPath,
org.w3c.dom.Node n)
Returns a potentially empty collection of Nodes matching an
XPath expression.
|
java.lang.Iterable<org.w3c.dom.Node> |
selectNodes(java.lang.String xPath,
javax.xml.transform.Source s)
Returns a potentially empty collection of Nodes matching an
XPath expression.
|
void |
setNamespaceContext(java.util.Map<java.lang.String,java.lang.String> prefix2Uri)
Establish a namespace context.
|
public JAXPXPathEngine(javax.xml.xpath.XPathFactory fac)
public JAXPXPathEngine()
public java.lang.Iterable<org.w3c.dom.Node> selectNodes(java.lang.String xPath,
javax.xml.transform.Source s)
selectNodes in interface XPathEnginepublic java.lang.String evaluate(java.lang.String xPath,
javax.xml.transform.Source s)
evaluate in interface XPathEnginepublic java.lang.Iterable<org.w3c.dom.Node> selectNodes(java.lang.String xPath,
org.w3c.dom.Node n)
selectNodes in interface XPathEnginepublic java.lang.String evaluate(java.lang.String xPath,
org.w3c.dom.Node n)
evaluate in interface XPathEnginepublic void setNamespaceContext(java.util.Map<java.lang.String,java.lang.String> prefix2Uri)
setNamespaceContext in interface XPathEngineprefix2Uri - maps from prefix to namespace URI.