public class JsXPathEvaluator extends JsElementalMixinBase implements XPathEvaluator
SVG_ZOOMANDPAN_DISABLE, SVG_ZOOMANDPAN_MAGNIFY, SVG_ZOOMANDPAN_UNKNOWN
Modifier | Constructor and Description |
---|---|
protected |
JsXPathEvaluator() |
Modifier and Type | Method and Description |
---|---|
JsXPathExpression |
createExpression(String expression,
XPathNSResolver resolver)
Creates an
nsIDOMXPathExpression
which can then be used for (repeated) evaluations. |
JsXPathNSResolver |
createNSResolver(Node nodeResolver)
Creates an
nsIDOMXPathExpression
which resolves name spaces with respect to the definitions in scope for a specified node. |
JsXPathResult |
evaluate(String expression,
Node contextNode,
XPathNSResolver resolver,
int type,
XPathResult inResult)
Evaluate the specified XPath expression.
|
addEventListener, addEventListener, beginElement, beginElementAt, dispatchEvent, endElement, endElementAt, getAnimatedClassName, getAnimatedHeight, getAnimatedHref, getAnimatedResult, getAnimatedTransform, getAnimatedWidth, getAnimatedX, getAnimatedY, getBBox, getChildElementCount, getCTM, getExternalResourcesRequired, getFarthestViewportElement, getFirstElementChild, getLastElementChild, getNearestViewportElement, getNextElementSibling, getPresentationAttribute, getPreserveAspectRatio, getPreviousElementSibling, getRequiredExtensions, getRequiredFeatures, getScreenCTM, getSvgStyle, getSystemLanguage, getTransformToElement, getViewBox, getXmllang, getXmlspace, getZoomAndPan, hasExtension, querySelector, querySelectorAll, removeEventListener, removeEventListener, setXmllang, setXmlspace, setZoomAndPan
at, at, intAt, intAt, length, numberAt, numberAt, setAt, setAt, setAt, setAt, setAt, setAt
cast, createArray, createArray, createFunction, createObject, equals, hashCode, toSource, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
intAt, length
numberAt
public final JsXPathExpression createExpression(String expression, XPathNSResolver resolver)
XPathEvaluator
Creates an nsIDOMXPathExpression
which can then be used for (repeated) evaluations.
Prior to Gecko 1.9, you could call this method on documents other than the one you planned to run the XPath against; starting with Gecko 1.9, however, you must call it on the same document.
expression
resolver
An XPath expression, as an nsIDOMXPathExpression
object.
createExpression
in interface XPathEvaluator
public final JsXPathNSResolver createNSResolver(Node nodeResolver)
XPathEvaluator
Creates an nsIDOMXPathExpression
which resolves name spaces with respect to the definitions in scope for a specified node. It is used to resolve prefixes within the XPath itself, so that they can be matched with the document. null
is common for HTML documents or when no name space prefixes are used.
nodeResolver
A name space resolver.
createNSResolver
in interface XPathEvaluator
public final JsXPathResult evaluate(String expression, Node contextNode, XPathNSResolver resolver, int type, XPathResult inResult)
XPathEvaluator
Evaluate the specified XPath expression.
expression
contextNode
document.documentElement
.resolver
type
nsIXPathResult
.result
nsIXPathResult
to use for the result. Using null
will create a new nsIXPathResult
.An XPath result.
evaluate
in interface XPathEvaluator
Copyright © 2016. All rights reserved.