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 ...

Get Java™ Connector Architecture: Building Custom Connectors and Adapters now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.