Chapter 13
Manipulating XML: The DOM
DOM stands for Document Object Model, and it creates the logical structure of a document. By virtue of this structure you can read through and manipulate the document. The goal of DOM is to create a language-independent interface to XML documents so that any language, be it Perl or Python or PHP, can use the same DOM to move through an XML document.
DOM can recognize the following nodes:
- Document
- DocumentFragment
- DocumentType
- EntityReference
- Element
- Attr
- ProcessingInstruction
- Comment
- Text
- CDATASection
- Entity
- Notation
DOM also utilizes a number of interfaces, functions, and methods to get its job done.