|
Creating new DOM-builder to read XML documents |
|
|
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...
|
Related Tips
|
Page 1 of 0 ( 0 comments )
You can share your information about this topic using the form below!
Please do not post your questions with this form! Thanks.