xpath
Source: lib/xpath.js (pure JS) — default export: XPath
XPath-style addressing over a DOM-like tree, plus the standard
XPathEvaluator/XPathResult surface.
Exports
| Export | Args | Kind | Description |
|---|---|---|---|
XPath | — | class | An XPath expression / path object. (default export) |
ImmutableXPath, MutableXPath, XPathExpression | — | const | Aliases of XPath. |
XPathEvaluator | — | class | Evaluates expressions against a context node. |
XPathResult | — | class | Result wrapper (node set / value). |
XPathException | — | class | Error type for evaluation failures. |
DereferenceError | — | class | Thrown when a path can't be resolved (extends Error). |
parseXPath(str) | 1 | function | Parses an XPath string. |
buildXPath(ptr, root) | 2 | function | Builds an XPath addressing ptr within root. |
getSiblings(ptr, root) | 2 | function | Returns sibling nodes of the addressed node. |
Export list
Generated by utilities/doc-api.js from the xpath dump of utilities/api-surface.sh: 64 members. Edit the text above this block, not the block.
Functions: buildXPath(), getSiblings(), parseXPath()
DereferenceError
class, constructible
- properties:
[Symbol.toStringTag]
ImmutableXPath
class, constructible
- static methods:
from() - methods:
deref(),toPointer(),[Symbol.inspect](),[Symbol.iterator]() - properties:
length (get),[Symbol.toStringTag]
MutableXPath
class, constructible
- static methods:
from() - methods:
deref(),toPointer(),[Symbol.inspect](),[Symbol.iterator]() - properties:
length (get),[Symbol.toStringTag]
XPath
class, constructible
- static methods:
from() - methods:
deref(),toPointer(),[Symbol.inspect](),[Symbol.iterator]() - properties:
length (get),[Symbol.toStringTag]
XPathEvaluator
class, constructible
- methods:
createExpression()
XPathException
class, constructible
XPathExpression
class, constructible
- static methods:
from() - methods:
deref(),toPointer(),[Symbol.inspect](),[Symbol.iterator]() - properties:
length (get),[Symbol.toStringTag]
XPathResult
class, constructible
- properties:
booleanValue,invalidIteratorState,numberValue,resultType,singleNodeValue,snapshotLength
default
class, constructible
- static methods:
from() - methods:
deref(),toPointer(),[Symbol.inspect](),[Symbol.iterator]() - properties:
length (get),[Symbol.toStringTag]