Code example for Document

Methods: createComment

0
        aNewDoc = (Document) load("staffNS", builder);
        cDataSec = aNewDoc.createCDATASection("this is CDATASection data");
        aNode = doc.importNode(cDataSec, false);
        ownerDocument = aNode.getOwnerDocument();
        assertNotNull("ownerDocumentNotNull", ownerDocument);
        docType = ownerDocument.getDoctype();
        system = docType.getSystemId();
        assertURIEquals("dtdSystemId", null, null, null, "staffNS.dtd", null, 
                null, null, null, system);
        value = aNode.getNodeValue();
        assertEquals("nodeValue", "this is CDATASection data", value);
    } 
    @TestTargetNew( 
        level = TestLevel.PARTIAL_COMPLETE, 
        notes = "Doesn't verify DOMException.", 
        method = "importNode", 
        args = {org.w3c.dom.Node.class, boolean.class}
    ) 
    public void testImportNode3() throws Throwable { 
        Document doc;
        Document aNewDoc;