Since DOM is only an interface, in order to use it the application must define its implementation. DOM implementation in Java can be set via system-property javax.xml.parsers.DocumentBuilderFactory. Since Xerces package was integrated to Java Runtime Envorinment, this implementation is used by default. By this reason, in common case there is no need to specify alternate implementations:
// request default built-in DOM-implementation: DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); // then we may create document-builder: DocumentBuilder loader = factory.newDocumentBuilder(); // now we're ready to create DOM-documents...