|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.brownell.xml.DomFactory
Instantiates a DOMImplementation object, according to system defaults or a user-specified implementation choice. When used with the current DOM Level 2 specification, this means that Java applications have a completely portable mechanism way to create empty DOM documents. This is one of the two basic ways that DOM documents are normally used. Any vendor-specific issues may be encapsulated through changes to the implementation of one static method.
A separate mechanism is still required to connect a DOM implementation to an XML or HTML processor ("parser"), producing a document which is not empty but rather is populated with results of parsing a document. In this package the DomBuilder class solves that problem for SAX parsers. (In the future these two mechanisms might be integrated in one class, once it is possible to use a single configuration mechanism to address both issues.)
Also, because DOM includes APIs that provide read-only access to some facilities without including the capability to write them, some parts of DOM still remain accessible only through use of proprietary APIs. Much DTD-related functionality is so constrained.
DomBuilder
Method Summary | |
static org.w3c.dom.DOMImplementation |
createDom()
Access the system default DOM implementation. |
static org.w3c.dom.DOMImplementation |
createDom(java.lang.String className)
Create a new DOM implementation object using the class name provided. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Method Detail |
public static org.w3c.dom.DOMImplementation createDom() throws java.lang.reflect.InvocationTargetException
Access the system default DOM implementation. The actual implementation of this method may vary between implementations of the DOM, but the interface is not subject to change.
The reference implementation of this class works with all DOM implementations which can be accessed using only a default constructor. The class name may be specified by the org.brownell.xml.dom system property, or by a built-in default if that property is not available. The named class must exist and must implement the org.w3c.dom.DomImplementation interface.
Other implementations of this method are free to use other mechanisms. For example, a browser might both hard-wire some specific implementation, and also arrange that it be initialized to bind the DOM objects to some particular window and an associated rendering engine.
createDom(java.lang.String)
public static org.w3c.dom.DOMImplementation createDom(java.lang.String className) throws java.lang.reflect.InvocationTargetException
No implementation-specific behavior is allowed for this method, unlike its no-arguments cousin which explicitly allows it. This method is only useful for DOM implementations which provide a null constructor which is publicly accessible, which at this writing describes almost all DOM implementations in Java.
className
- A string containing the name of the class
implementing the DomImplementation interface.createDom()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |