Summary
The org.w3c.dom package includes 13 different subclasses of Node that represent the various possible components of a DOM tree:
Document
The root of the DOM tree. Acts as a factory class for the other kinds of nodes; offers access to the root element, document type declaration, and DOM implementation.
DocumentType
Represents the document type declaration. Provides access to the notations and entities declared in the document's DTD.
Element
Represents an element, including its local name, prefixed name, namespace URI, and attributes.
CharacterData
A common superinterface for Text CDATASection, and Comment. Provides methods to read and modify the text content of these nodes.
Text
Represents a text node in the DOM tree. Has a method to split a text ...
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