Microsoft XML SDK 2.6 - XML Reference

IXMLDOMElement Interface

Represents the element object.

This interface inherits from IXMLDOMNode.

Methods

getAttribute Retrieves the value of the named attribute.
getAttributeNode Retrieves the named attribute node.
getElementsByTagName Returns a list of all descendant elements that match the supplied name.
normalize Normalizes all descendant elements; combines two or more adjacent text nodes into one unified text node.
removeAttribute Removes or replaces the named attribute.
removeAttributeNode Removes the specified attribute from this element.
setAttribute Sets the value of the named attribute.
setAttributeNode Adds or changes the supplied attribute node on this element.
tagName Contains the element name—the name that appears within the tag.

Remarks

Element nodes are among the most common objects in the XML document tree. Element nodes can have attributes associated with them. By definition, attributes are not defined as child nodes of an element and are not considered to be part of the document tree. Accordingly, the XMLDOMElement object provides methods to make it easier to manage attributes, including methods to associate an attribute with an element and to retrieve an attribute object and the attribute value by name.

To retrieve the set of all attributes associated with an element, you can also call the getAttributes method, which returns an XMLDOMNamedNodeMap collection object that contains all the element's attributes.

Requirements

Implementation: Msxml.dll

Header and IDL files: Msxml.h, Xmldom.idl

Version-Independent ProgID: MSXML2.DOMDocument

See Also

IXMLDOMNode Interface | IXMLDOMText Interface