Public Methods | |
| nodecloneattributescopied (DOMTestDocumentBuilderFactory factory) | |
| void | runTest () throws java.lang.Throwable |
| String | getTargetURI () |
Static Public Methods | |
| void | main (String[] args) |
Retrieve the last child of the second employee and inoke the "cloneNode(deep)" method with deep=true. The duplicate node returned by the method should copy the attributes associated with this node.
Definition at line 46 of file nodecloneattributescopied.java.
|
|
Definition at line 48 of file nodecloneattributescopied.java.
00049 {
00050 super(factory);
00051
00052 }
|
|
|
Reimplemented from DOMTest. Definition at line 82 of file nodecloneattributescopied.java.
00082 {
00083 return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/nodecloneattributescopied";
00084 }
|
|
|
Definition at line 85 of file nodecloneattributescopied.java. References DOMTestCase::doMain().
00085 {
00086 DOMTestCase.doMain(nodecloneattributescopied.class,args);
00087 }
|
|
|
Reimplemented from DOMTestCase. Definition at line 54 of file nodecloneattributescopied.java. References DOMTestCase::assertEquals(), and DOMTest::load().
00054 {
00055 Document doc;
00056 NodeList elementList;
00057 Node addressNode;
00058 Node clonedNode;
00059 NamedNodeMap attributes;
00060 Node attributeNode;
00061 String attributeName;
00062 Collection result = new ArrayList();
00063
00064 Collection expectedResult = new ArrayList();
00065 expectedResult.add("domestic");
00066 expectedResult.add("street");
00067
00068 doc = load("staff");
00069 elementList = doc.getElementsByTagName("address");
00070 addressNode = elementList.item(1);
00071 clonedNode = addressNode.cloneNode(false);
00072 attributes = clonedNode.getAttributes();
00073 for(int _index = 0; _index < attributes.getLength();_index++) {
00074 attributeNode = ( Node ) attributes.item(_index);
00075 attributeName = attributeNode.getNodeName();
00076 result.add(attributeName);
00077
00078 }
00079 assertEquals("nodeCloneAttributesCopiedAssert1",expectedResult,result);
00080
00081 }
|
1.2.13.1 written by Dimitri van Heesch,
© 1997-2001