new Namespace()
Extends
Classes
Members
(readonly) document
- Description:
- Find the Document that this node is in, if it is in a Document.
- Source:
- Inherited From:
Find the Document that this node is in, if it is in a Document.
(nullable) parent :Node
- Source:
- Inherited From:
Type:
Methods
first(pattern, contextopt) → {string|Node|number|null}
- Description:
- Get the first matching node for a given pattern, or null if none exist.
- Source:
- Inherited From:
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
pattern |
string | XPath | The pattern to match | ||
context |
Node |
<optional> |
this
|
The context node. Uses this node as context if none is provided. |
Returns:
The first match if one exists
- Type
- string | Node | number | null
get(pattern, contextopt) → {XPathResult}
- Description:
- Get all of the nodes that match the given XPath pattern, with the given context for XPath execution.
- Source:
- Inherited From:
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
pattern |
string | XPath | The pattern to match | ||
context |
Node |
<optional> |
this
|
The context node. Uses this node as context if none is provided. |
Returns:
The matching nodes
- Type
- XPathResult
(abstract) text(newTextopt) → {string|Node}
- Description:
- Default implementation of text returns empty string.
- Source:
- Inherited From:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
newText |
string |
<optional> |
New text to insert |
Returns:
The concatenated text
- Type
- string | Node
toString(optionsopt) → {string}
- Description:
- Convert to string.
- Source:
- Overrides:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
options |
MaybeStylizedSeparated |
<optional> |
How to convert to string |
Returns:
The node, converted to a string
- Type
- string