The XMLElement class is the main element class.
The XMLElement class defines the following attributes.
|
|
|
tagName
|
String
|
The tag name
|
textContent
|
String
|
The text content
|
The XMLElement class defines the following methods.
|
|
|
appendChild(XMLNode):Object
|
Object
|
Adds a newChild node to the end of the list of child nodes of this node. If the newChild node exists in the tree, it is first removed.
|
cloneNode(boolean):Object
|
Object
|
Clones a node.
|
getAttributes():Object
|
Object
|
Contains the attributes of an element.
|
getChildNodes():XMLNodeList
|
XMLNodeList
|
Gets all child nodes.
|
getElementsByTagName(String):Object
|
Object
|
Returns an XMLNodeList of all elements with a given tag name in the order in which they are encountered in a pre-ordered traversal of the current element tree.
|
hasAttribute(String):boolean
|
Boolean
|
Returns true if the attribute exists.
|
insertBefore(XMLNode,XMLNode):Object
|
Object
|
Inserts a newChild node before the existing child node refChild. If refChild is null, the newChild node is inserted at the end of list of child nodes. If the newChild node exists in the tree, it is first removed.
|
normalize():Object
|
Object
|
Normalizes the node.
|
removeAttribute(String):Object
|
Object
|
Removes an attribute with a given name.
|
removeChild(XMLNode):Object
|
Object
|
Removes the child node indicated by oldChild from the list of child nodes and returns it.
|
replaceChild(XMLNode,XMLNode):Object
|
Object
|
Replaces the oldChild node with a newChild node in the list of child nodes and returns the oldChild node. If the newChild node exists in the tree, it is first removed.
|
setAttribute(String,String):Object
|
Object
|
Sets a new attribute.
|