Click to return to the XML (Extensible Markup Language) home page    
IXMLDOMDocumentType Inter...     IXMLDOMEntity Interface     XML DOM Interfaces    
Web Workshop  |  XML (Extensible Markup Language)

IXMLDOMElement Interface


This interface represents the element object.

IXMLDOMElement 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 descendent 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 the element and are not considered to be part of the document tree. Accordingly, the IXMLDOMElement 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 the element, you can also call the getAttribute method, which returns an IXMLDOMNamedNodeMap collection object that contains all the element's attributes.

Interface Information

Implementation Msxml.dll
Inherits from IXMLDOMNode
Header and IDL files Msxml.h, Xmldom.idl
Minimum availability Internet Explorer 5
Minimum operating systems Windows 95, Windows NT 4.0


Back to topBack to top

Did you find this topic useful? Suggestions for other topics? Write us!

© 1999 Microsoft Corporation. All rights reserved. Terms of use.