org.w3c.domts.level2.core

Class documentimportnode21

public final class documentimportnode21 extends DOMTestCase

The importNode method imports a node from another document to this document. The returned node has no parent; (parentNode is null). The source node is not altered or removed from the original document but a new copy of the source node is created. Using the method importNode with deep=true, retreive the entity refs present in the second element node whose tagName is address and import these nodes into another document. Verify if the nodes have been imported correctly by checking the nodeNames of the imported nodes, since they are imported into a new document which doesnot have thes defined, the imported nodes should not have any children. Now import the entityRef nodes into the same document and verify if the nodes have been imported correctly by checking the nodeNames of the imported nodes, and by checking the value of the replacement text of the imported nodes.

See Also: http://www.w3.org/TR/DOM-Level-2-Core/core http://www.w3.org/TR/DOM-Level-2-Core/core#Core-Document-importNode

Constructor Summary
documentimportnode21(DOMTestDocumentBuilderFactory factory)
Constructor.
Method Summary
StringgetTargetURI()
Gets URI that identifies the test.
static voidmain(String[] args)
Runs this test from the command line.
voidrunTest()
Runs the test case.

Constructor Detail

documentimportnode21

public documentimportnode21(DOMTestDocumentBuilderFactory factory)
Constructor.

Parameters: factory document factory, may not be null

Throws: org.w3c.domts.DOMTestIncompatibleException Thrown if test is not compatible with parser configuration

Method Detail

getTargetURI

public String getTargetURI()
Gets URI that identifies the test.

Returns: uri identifier of test

main

public static void main(String[] args)
Runs this test from the command line.

Parameters: args command line arguments

runTest

public void runTest()
Runs the test case.

Throws: Throwable Any uncaught exception causes test to fail