Summary
The Document Object Model, DOM, is a W3C standard API for reading and writing XML and HTML documents represented as trees. DOM is defined in IDL, but there are standard bindings for Java. In DOM, an XML document is represented as a connected tree of Node objects. The root of the tree is a Document object. Other kinds of nodes found in the tree include Element, Text, Comment, ProcessingInstruction, and several more. The basic Node interface provides generic methods to navigate the tree, as well as to get the names, values, local names, prefixes, types, and namespace URIs of each node. Because not all of these properties really make sense for all kinds nodes, many of these methods can return null.
DOM Level 2 does not provide any standard ...
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