org.apache.xerces.dom3.bootstrap
Class DOMImplementationRegistry
java.lang.Object
org.apache.xerces.dom3.bootstrap.DOMImplementationRegistry
public class DOMImplementationRegistry
extends java.lang.Object
This class holds the list of registered DOMImplementations. The contents
of the registry are drawn from the System Property
org.w3c.dom.DOMImplementationSourceList
, which must contain a
white-space delimited sequence of the names of classes implementing
DOMImplementationSource
.
Applications may also register DOMImplementationSource
implementations by using a method on this class. They may then
query instances of the registry for implementations supporting
specific features.
Example:
// get an instance of the DOMImplementation registry
DOMImplementationRegistry registry = DOMImplementationRegistry.newInstance();
// get a DOM implementation the Level 3 XML module
DOMImplementation domImpl = registry.getDOMImplementation("XML 3.0");
This provides an application with an implementation-independent
starting point.
PROPERTY
public static final String PROPERTY
addSource
public void addSource(DOMImplementationSource s)
throws ClassNotFoundException,
InstantiationException,
IllegalAccessException
Register an implementation.
getDOMImplementation
public DOMImplementation getDOMImplementation(String features)
throws ClassNotFoundException,
InstantiationException,
IllegalAccessException,
ClassCastException
Return the first registered implementation that has the desired
features, or null if none is found.
features
- A string that specifies which features are required.
This is a space separated list in which each feature is
specified by its name optionally followed by a space
and a version number.
This is something like: "XML 1.0 Traversal +Events 2.0"
- An implementation that has the desired features, or
null
if this source has none.
getDOMImplementationList
public DOMImplementationList getDOMImplementationList(String features)
throws ClassNotFoundException,
InstantiationException,
IllegalAccessException,
ClassCastException
Return the list of all registered implementation that support the desired
features.
features
- A string that specifies which features are required.
This is a space separated list in which each feature is
specified by its name optionally followed by a space
and a version number.
This is something like: "XML 1.0 Traversal +Events 2.0"
- A list of DOMImplementations that support the desired features.
newInstance
public static DOMImplementationRegistry newInstance()
throws ClassNotFoundException,
InstantiationException,
IllegalAccessException
Copyright © 1999-2004 Apache XML Project. All Rights Reserved.