- java.lang.Object
-
- org.w3c.dom.bootstrap.DOMImplementationRegistry
-
public final class DOMImplementationRegistry extends Object
A factory that enables applications to obtain instances ofDOMImplementation
.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.
- Since:
- DOM Level 3
- See Also:
DOMImplementation
,DOMImplementationSource
-
-
Field Summary
Fields Modifier and Type Field and Description static String
PROPERTY
The system property to specify the DOMImplementationSource class names.
-
Method Summary
Methods Modifier and Type Method and Description void
addSource(DOMImplementationSource s)
Register an implementation.DOMImplementation
getDOMImplementation(String features)
Return the first implementation that has the desired features, ornull
if none is found.DOMImplementationList
getDOMImplementationList(String features)
Return a list of implementations that support the desired features.static DOMImplementationRegistry
newInstance()
Obtain a new instance of aDOMImplementationRegistry
.
-
-
-
Field Detail
-
PROPERTY
public static final String PROPERTY
The system property to specify the DOMImplementationSource class names.- See Also:
- Constant Field Values
-
-
Method Detail
-
newInstance
public static DOMImplementationRegistry newInstance() throws ClassNotFoundException, InstantiationException, IllegalAccessException, ClassCastException
Obtain a new instance of aDOMImplementationRegistry
. TheDOMImplementationRegistry
is initialized by the application or the implementation, depending on the context, by first checking the value of the Java system propertyorg.w3c.dom.DOMImplementationSourceList
and the service provider whose contents are at "META_INF/services/org.w3c.dom.DOMImplementationSourceList
". The value of this property is a white-space separated list of names of availables classes implementing theDOMImplementationSource
interface. Each class listed in the class name list is instantiated and any exceptions encountered are thrown to the application.- Returns:
- an initialized instance of DOMImplementationRegistry
- Throws:
ClassNotFoundException
- If any specified class can not be foundInstantiationException
- If any specified class is an interface or abstract classIllegalAccessException
- If the default constructor of a specified class is not accessibleClassCastException
- If any specified class does not implementDOMImplementationSource
-
getDOMImplementation
public DOMImplementation getDOMImplementation(String features)
Return the first implementation that has the desired features, ornull
if none is found.- Parameters:
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"- Returns:
- An implementation that has the desired features,
or
null
if none found.
-
getDOMImplementationList
public DOMImplementationList getDOMImplementationList(String features)
Return a list of implementations that support the desired features.- Parameters:
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"- Returns:
- A list of DOMImplementations that support the desired features.
-
addSource
public void addSource(DOMImplementationSource s)
Register an implementation.- Parameters:
s
- The source to be registered, may not benull
-
-
Traduction non disponible
Les API Java ne sont pas encore traduites en français sur l'infobrol. Seule la version anglaise est disponible pour l'instant.
Version en cache
26/11/2024 07:37:13 Cette version de la page est en cache (à la date du 26/11/2024 07:37:13) afin d'accélérer le traitement. Vous pouvez activer le mode utilisateur dans le menu en haut pour afficher la dernère version de la page.Document créé le 06/12/2006, dernière modification le 04/03/2020
Source du document imprimé : https://www.gaudry.be/java-api-rf-org/w3c/dom/bootstrap/domimplementationregistry.html
L'infobrol est un site personnel dont le contenu n'engage que moi. Le texte est mis à disposition sous licence CreativeCommons(BY-NC-SA). Plus d'info sur les conditions d'utilisation et sur l'auteur.
Références
Ces références et liens indiquent des documents consultés lors de la rédaction de cette page, ou qui peuvent apporter un complément d'information, mais les auteurs de ces sources ne peuvent être tenus responsables du contenu de cette page.
L'auteur de ce site est seul responsable de la manière dont sont présentés ici les différents concepts, et des libertés qui sont prises avec les ouvrages de référence. N'oubliez pas que vous devez croiser les informations de sources multiples afin de diminuer les risques d'erreurs.