Code example for DOMImplementation

Methods: createDocument

0
        String qualifiedName = "xml:root";
        DocumentType docType = null;
 
        doc = (Document) load("staffNS", builder);
        domImpl = doc.getImplementation();
 
        { 
            boolean success = false;
            try { 
                domImpl.createDocument(namespaceURI, qualifiedName, docType);
            } catch (DOMException ex) {
                success = (ex.code == DOMException.NAMESPACE_ERR);
            } 
            assertTrue("domimplementationcreatedocument05", success);
        } 
    } 
    @TestTargetNew( 
        level = TestLevel.PARTIAL, 
        notes = "Verifies DOMException with NAMESPACE_ERR code.", 
        method = "createDocument", 
        args = {java.lang.String.class, java.lang.String.class, org.w3c.dom.DocumentType.class}