All attributes of this element.
The content string of the node.
The XmlDocument containing this node.
The node representing the first child of an element.
Note that the children of an element do not include attributes.
null if this node has no child.
The node representing the last child of an element.
Note that the children of an element do not include attributes.
Return null if this node has no child
The line number of the node if the node is parsed from an XML document.
use nsDeclarations instead.
The name of this node.
Alias of prefix
Effective namespace declarations on this node, including inherited.
The URI of the namespace applied to this node.
The node that represents the next sibling.
null if this node is the last one.
Namespace declarations on this element
Empty object if there's no local namespace definition on this element. Note that default namespace uses empty string as key in the returned object.
The parent node of this node.
For root node, its parent is null.
The prefix representing the namespace applied to this node.
Set the namespace prefix of this node.
The new prefix to set. Use empty string to remove the prefix.
The node that represents the previous sibling.
null if this node is the first one.
Add a child comment node to the end of the children list.
the content of the comment
Add a new element to the end of the children list.
the element name
Optional
prefix: stringthe prefix of the element for the namespace
Optional
prefix: stringuse addNsDeclaration instead.
Add a comment sibling node after this node.
the content of the comment
Add an element sibling node after this node.
the element name
Optional
prefix: stringthe prefix of the element for the namespace
Get the attribute of this element.
The name of the attribute
Optional
prefix: stringThe namespace prefix to the attribute.
null if the attribute doesn't exist.
Find all the descendant nodes matching the given compiled xpath selector.
XPath selector
An empty array if the provided XPath is invalid or if no nodes are found.
Find all the descendant nodes matching the given xpath selector.
XPath selector
Optional
namespaces: NamespaceMapmapping between prefix and the namespace URI, used in the XPath
An empty array if the provided XPath is invalid or if no nodes are found.
Find the first descendant node matching the given compiled xpath selector
XPath selector
null if not found, otherwise an instance of the subclass of XmlNode.
Find the first descendant node matching the given xpath selector
XPath selector
Optional
namespaces: NamespaceMapmapping between prefix and the namespace URI, used in the XPath
null if not found, otherwise an instance of the subclass of XmlNode.
Insert a comment sibling node before this node.
the content of the comment
Insert an element sibling node before this node.
the element name
Optional
prefix: stringthe prefix of the element for the namespace
Set the attribute of this element.
The name of the attribute
The value of the attribute
Optional
prefix: stringThe namespace prefix to the attribute.
The class representing an XML element node.