The XMLDOMAttribute Object

In both the W3C DOM and the Microsoft DOM, attribute objects are node objects (that is, they are based on the node object), but they are not actually child nodes of an element and are not considered part of the document tree. Instead, attributes are considered properties of their associated elements (this means that properties such as parentNode, previousSibling, and nextSibling are meaningless for attributes). We'll see how to work with attributes in this chapter.

Here are the base properties of the XMLDOMAttribute 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 child nodes. Read-only. ...

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.