DOMImplementation.
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. DOM implementations may modify this class to meet new security standards or to provide *additional* fallbacks for the list of DOMImplementationSources.
DOMImplementation, DOMImplementationSource
| Modifier and Type | Field and Description |
|---|---|
| private static final int | DEFAULT_LINE_LENGTH
Default columns per line. |
| private static final String | |
| private static final String | FALLBACK_CLASS
Default class name. |
| public static final String | PROPERTY
The system property to specify the DOMImplementationSource class names. |
| private List | sources
The list of DOMImplementationSources. |
| Access | Constructor and Description |
|---|---|
| private | DOMImplementationRegistry(final List<DOMImplementationSource>
List of DOMImplementationSources srcs)Private constructor. |
| Modifier and Type | Method and Description |
|---|---|
| public void | addSource(final DOMImplementationSource
The source to be registered, may not be s)nullRegister an implementation. |
| private static ClassLoader | |
| private static ClassLoader | |
| public DOMImplementation | Returns: An implementation that has the desired features, ornull if none found.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" features)Return the first implementation that has the desired
features, or |
| public DOMImplementationList | Returns: A list of DOMImplementations that support the desired 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" features)Return a list of implementations that support the desired features. |
| private static InputStream | Returns: an InputStream for the resource specifiedclassLoader classLoader, final String the resource name)This method returns an InputStream for the reading resource META_INF/services/org.w3c.dom.DOMImplementationSourceList. |
| private static String | Returns: first line of resource, ornullclassLoader, may not be classLoader)null.This method attempts to return the first line of the resource META_INF/services/org.w3c.dom.DOMImplementationSourceList from the provided ClassLoader. |
| private static String | Returns: the system propertythe name of the system property name)This method returns the system property indicated by the specified name. |
| public static DOMImplementationRegistry | Returns: an initialized instance of DOMImplementationRegistryObtain a new instance of a |
| DEFAULT_LINE_LENGTH | back to summary |
|---|---|
| private static final int DEFAULT_LINE_LENGTH Default columns per line. | |
| DEFAULT_PACKAGE | back to summary |
|---|---|
| private static final String DEFAULT_PACKAGE | |
| FALLBACK_CLASS | back to summary |
|---|---|
| private static final String FALLBACK_CLASS Default class name. | |
| PROPERTY | back to summary |
|---|---|
| public static final String PROPERTY The system property to specify the DOMImplementationSource class names. | |
| sources | back to summary |
|---|---|
| private List<DOMImplementationSource> sources The list of DOMImplementationSources. | |
| DOMImplementationRegistry | back to summary |
|---|---|
| private DOMImplementationRegistry(final List<DOMImplementationSource> srcs) Private constructor.
| |
| addSource | back to summary |
|---|---|
| public void addSource(final DOMImplementationSource s) Register an implementation.
| |
| getClassLoader | back to summary |
|---|---|
| private static ClassLoader getClassLoader() Gets a class loader.
| |
| getContextClassLoader | back to summary |
|---|---|
| private static ClassLoader getContextClassLoader() This method returns the ContextClassLoader.
| |
| getDOMImplementation | back to summary |
|---|---|
| public DOMImplementation getDOMImplementation(final String features) Return the first implementation that has the desired
features, or
| |
| getDOMImplementationList | back to summary |
|---|---|
| public DOMImplementationList getDOMImplementationList(final String features) Return a list of implementations that support the desired features.
| |
| getResourceAsStream | back to summary |
|---|---|
| private static InputStream getResourceAsStream(final ClassLoader classLoader, final String name) This method returns an InputStream for the reading resource META_INF/services/org.w3c.dom.DOMImplementationSourceList.
| |
| getServiceValue | back to summary |
|---|---|
| private static String getServiceValue(final ClassLoader classLoader) This method attempts to return the first line of the resource META_INF/services/org.w3c.dom.DOMImplementationSourceList from the provided ClassLoader.
| |
| getSystemProperty | back to summary |
|---|---|
| private static String getSystemProperty(final String name) This method returns the system property indicated by the specified name. | |
| newInstance | back to summary |
|---|---|
| public static DOMImplementationRegistry newInstance() throws ClassNotFoundException, InstantiationException, IllegalAccessException, ClassCastException Obtain a new instance of a
| |