Nodes and Objects
The W3C DOM uses a dual reference to describe the document objects. Everything in the object model is
A node.
A named object type.
As previously noted, this leads to a certain overlap in the syntax. However, this is not necessarily a bad thing. For the most part, nodes and objects are represented in the document tree. However, the Attr node is one kind of node that is not represented in the tree, but is a node just the same.
The Attr node represents the XML attribute of an element node. It is called an Attr node to distinguish it from the IDL type of attribute. The Attr node does not take part in the tree structure. In other words, it is not considered to be the child node of any node. Instead, it is considered to ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access