DOMImplementationImpl.javaAPI DocAndroid 1.5 API2637Wed May 06 22:41:06 BST 2009org.apache.harmony.xml.dom


public class DOMImplementationImpl extends Object implements DOMImplementation
Provides a straightforward implementation of the corresponding W3C DOM interface. The class is used internally only, thus only notable members that are not in the original interface are documented (the W3C docs are quite extensive). Hope that's ok.

Some of the fields may have package visibility, so other classes belonging to the DOM implementation can easily access them while maintaining the DOM tree structure.

Fields Summary
private static DOMImplementationImpl
Constructors Summary

Methods Summary
public org.w3c.dom.DocumentcreateDocument(java.lang.String namespaceURI, java.lang.String qualifiedName, org.w3c.dom.DocumentType doctype)

        return new DocumentImpl(this, namespaceURI, qualifiedName, doctype);
public org.w3c.dom.DocumentTypecreateDocumentType(java.lang.String qualifiedName, java.lang.String publicId, java.lang.String systemId)

        return new DocumentTypeImpl(this, qualifiedName, publicId, systemId);
public static org.apache.harmony.xml.dom.DOMImplementationImplgetInstance()
Requests the singleton instance of the class. Creates it first, if necessary.

The singleton Android DOMImplementationImpl instance.

        if (instance == null) {
            instance = new DOMImplementationImpl();

        return instance;
public booleanhasFeature(java.lang.String feature, java.lang.String version)

        // We claim to support DOM Core Level 1 & 2, nothing else.

        if ("Core".equalsIgnoreCase(feature) || "XML".equalsIgnoreCase(feature)) {
            if (version == null || "".equals(version) || "1.0".equals(version) || "2.0".equals(version)) {
                return true;

        return false;