Node API Calls

The table below lists the API calls you can do on the nodes within an XML document.

Property

Returns

Description

HasAttributes Boolean

Gets a value indicating whether this element has at least one attribute.

Property Value: true if the current node has attributes; otherwise, false.

HasElements

Boolean

Gets a value indicating whether this element has at least one child element.

Property Value: true if the current node has child elements; otherwise, false.

AttributeCount

Number

Gets the number of attributes on the current node (element).

Property Value: The number of attributes if the current node (element) has attributes; otherwise, null.

ElementCount

Number

Number Gets the number of elements on the current node.

Property Value: The number of elements if the current node (element) has child elements; otherwise, null.

Elements() : Element[]

Array of strings

Return all child elements of a node element.

Elements(name : string)

To specify namespace use following syntax for name “{http://myuri.org}name”

Array of strings

Return all child elements with the specified node element.

this[attributeName : string ]

To specify namespace for attribute use following syntax for name “{http://myuri.org}name”

String

Gets the value of the specified node attribute.