The DOMElement represents an element in an XML document.
The DOMElement object inherits the properties and methods of the DOMNode object.
The getAttributes method of the DOMNode object can be used to get the set of all attributes for an element. The getAttribute and getAttributeNode methods on the DOMElement object can be used to retrieve individual attributes.
Instance Properties
tagName |
A string denoting the name of the element. Element names are case sensitive in XML. |
|
Instance Methods
getAttribute |
Returns the value of a specified attribute. |
setAttribute |
Sets the value of an attribute of the DOMElement object. |
removeAttribute |
Removes a specified attribute node. |
getAttributeNode |
Returns an attribute node. |
setAttributeNode |
Adds a new attribute to the DOMElement object. |
removeAttributeNode |
Removes a specified attribute node. |
getElementsByTagName |
Returns a DOMNodeList object of all descendant elements with a specified tag name. |
getAttributeNS |
Returns the value of a specified attribute with a specified namespace. |
setAttributeNS |
Sets the values for a specified attribute with a specified namespace. |
removeAttributeNS |
Removes a specified attribute with a specified namespace. |
getAttributeNodeNS |
Returns a DOMAttribute object with a specified namespace. |
setAttributeNodeNS |
Adds an attribute or changes the value of an already existing attribute with a specified namespace. |
getElementsByTagNameNS |
Returns an array of all the child elements of the element that have the given tag name and the given namespace. The namespace argument should be the URI of the namespace. |
hasAttribute |
Checks to see if the DOMElement object has a specified attribute. |
hasAttributeNS |
Checks to see if the DOMElement has a specified attribute with a specified namespace. |
hasAttributes |
Checks to see if the DOMElement object has one or more child attributes. | |