The XMLDOMElement Object

The XMLDOMElement object represents elements and is probably the most common node object you'll deal with. Because attributes are not considered child nodes of an element object, you use special methods to get the attributes of an element. For example, you can use the getAttribute method, which returns an XMLDOMNamedNodeMap object that contains all the element's attributes.

Here are the base properties of the XMLDOMElement object:

  • attributes— The list of attributes for this node. Read-only.

  • baseName*— The base name for the name qualified with the namespace. Read-only.

  • childNodes— A node list containing the children. Read-only.

  • dataType*— The data type for this node. Read/write.

  • definition*— The definition of the node in the ...

Get Real World XML now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.