Class: Node

sync.api.dom.Node

new Node(id)

Constructor - should not be called directly.
Parameters:
Name Type Description
id string The id of the HTML node representing the XML element.
Source:

Methods

getChildNodes() → {Array.<sync.api.dom.Node>}

Returns the node's children.
Source:
Returns:
The child nodes of the node.
Type
Array.<sync.api.dom.Node>

getContent() → {string}

Returns a string that represents the content of the XML node where start and end tags are represented by the '\0' character.
Source:
Returns:
The content.
Type
string

getElementsByTagName(tagName) → {Array.<sync.api.dom.Node>}

Return all node's descendants with a given tag name.
Parameters:
Name Type Description
tagName String The tag name.
Source:
Returns:
all node's descendants with a given tag name.
Type
Array.<sync.api.dom.Node>

getParent() → {sync.api.dom.Node}

Returns the parent node.
Source:
Returns:
The parent node.
Type
sync.api.dom.Node

getTextContent() → {String}

Return the text content of the current node.
Source:
Returns:
The text content of the current node.
Type
String

getType() → {number}

Returns the node type.
Source:
Returns:
Type
number