XML Parsers
Two types of XML parsers are available: DOM parsers based on the Document Object Model (DOM), which is recommended by W3C as a language-neutral object model, and SAX parsers.
DOM Parsers
A DOM parser usually accepts an XML document file or a stream or an URI referring to an XML document. After the source XML document is parsed and validated (if the parser supports validation using DTDs or XML Schema), the parser generally exposes an interface capable of traversing the parsed document tree. Each item in the tree is linked to its parent, children, and siblings. Different types of nodes can exist in the tree, such as ELEMENT_NODE, ATTRIBUTE_NODE, TEXT_NODE, CDATA_SECTION_NODE, COMMENT_NODE, and so on.
An important thing to remember is ...
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