XML DOMLesson 32Free preview
DOM Nodes
This lesson is part of XML · All levels
Summary
In DOM, each part of an XML document is represented by a node. Common types of nodes are elements, attributes, text, comments, documents, and documentFragments. Understanding the type of node is important because each type has different access rules, for example attributes are not stored as a sub-element but are connected via a list of attributes.
Key points
- Elements, attributes, text, and comments are common types of nodes
- The document node becomes the root of the DOM tree
- Each node has a numeric type marker on the nodeType property.
- Attributes are connected to the element through a list of attributes
- DocumentFragment represents a temporary piece of document
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.