Open Directory Site XMLDOM Tutorials

ASP | XML | VBScript | JavaScript | ADO | CSS | XMLDOM | PHP | Operating Systems

Home >> XMLDOM >>DOM - The Element object

DOM - The Element object

 

The Element object

The element object represents the element nodes in the document. If the element node contains text, this text is represented in a text node. Listed below are the property and methods made for the element object.

Element Properties

Name Description

tagName Returns, or sets the name of the node

Element Methods

Name Description

getAttribute(attributeName) Returns the value of the specified attribute

getAttributeNode(attributeName) Returns the specified attribute node as an object

getElementsByTagName(tagName) Returns the specified node, and all its child as a nodeList

normalize() Puts the text nodes for this element, and its child nodes, into one text node, returns nothing

removeAttribute(attributeName) Removes the specified attribute's value. If the attribute has a default value this value is inserted

removeAttributeNode(attributeNode) Removes the specified attribute node. If the attribute node has a default value, this attribute is inserted

setAttribute(attributeName, attributeValue) Inserts a new attribute

setAttributeNode(attributeNodeName) Inserts a new attribute node

Cheap Web Hosting Articles - Web Site Design & Web Hosting Tutorials - Domain Hosting