Public Methods | |
| nodeappendchild (DOMTestDocumentBuilderFactory factory) | |
| void | runTest () throws java.lang.Throwable |
| String | getTargetURI () |
Static Public Methods | |
| void | main (String[] args) |
Retrieve the second employee and append a new Element node to the list of children. The last node in the list is then retrieved and its NodeName examined. The "getNodeName()" method should return "newChild".
Definition at line 46 of file nodeappendchild.java.
|
|
Definition at line 48 of file nodeappendchild.java.
00049 {
00050 super(factory);
00051
00052 }
|
|
|
Reimplemented from DOMTest. Definition at line 74 of file nodeappendchild.java.
00074 {
00075 return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/nodeappendchild";
00076 }
|
|
|
Definition at line 77 of file nodeappendchild.java. References DOMTestCase::doMain().
00077 {
00078 DOMTestCase.doMain(nodeappendchild.class,args);
00079 }
|
|
|
Reimplemented from DOMTestCase. Definition at line 54 of file nodeappendchild.java. References DOMTestCase::assertEquals(), and DOMTest::load().
00054 {
00055 Document doc;
00056 NodeList elementList;
00057 Node employeeNode;
00058 NodeList childList;
00059 Node createdNode;
00060 Node lchild;
00061 String childName;
00062 Node appendedChild;
00063 doc = load("staff");
00064 elementList = doc.getElementsByTagName("employee");
00065 employeeNode = elementList.item(1);
00066 childList = employeeNode.getChildNodes();
00067 createdNode = doc.createElement("newChild");
00068 appendedChild = employeeNode.appendChild(createdNode);
00069 lchild = employeeNode.getLastChild();
00070 childName = lchild.getNodeName();
00071 assertEquals("nodeAppendChildAssert1","newChild",childName);
00072
00073 }
|
1.2.13.1 written by Dimitri van Heesch,
© 1997-2001