
360 • XML & Related Technologies
7.2.3 JAXP and DOM
As we know, DOM creates an in-memory tree-like structure for processing XML documents. This tree is
loaded and kept in the main memory until the program execution is completed.
Let us first understand the important classes in the DOM implementation of JAXP.
Just as we have a parser factory and a parser implementation class for SAX, as discussed earlier, we
have similar concepts for DOM, as well. Here, we have a class named DocumentBuilderFactory. This
factory is responsible for producing an implementation class for DOM, depending on which parser is
being used. It works exactly like the SAXParserFactory ...