Public Methods | |
| nodechildnodesappendchild (DOMTestDocumentBuilderFactory factory) | |
| void | runTest () throws java.lang.Throwable |
| String | getTargetURI () |
Static Public Methods | |
| void | main (String[] args) |
Create a NodeList of the children of the second employee and then add a newly created element that was created by the "createElement()" method(Document Interface) to the second employee by using the "appendChild()" method. The length of the NodeList should reflect this new addition to the child list. It should return the value 14.
Definition at line 49 of file nodechildnodesappendchild.java.
|
|
Definition at line 51 of file nodechildnodesappendchild.java.
00052 {
00053 super(factory);
00054
00055 }
|
|
|
Reimplemented from DOMTest. Definition at line 84 of file nodechildnodesappendchild.java.
00084 {
00085 return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/nodechildnodesappendchild";
00086 }
|
|
|
Definition at line 87 of file nodechildnodesappendchild.java. References DOMTestCase::doMain().
00087 {
00088 DOMTestCase.doMain(nodechildnodesappendchild.class,args);
00089 }
|
|
|
Reimplemented from DOMTestCase. Definition at line 57 of file nodechildnodesappendchild.java. References DOMTestCase::assertSize(), DOMTest::isIgnoringElementContentWhitespace(), and DOMTest::load().
00057 {
00058 Document doc;
00059 NodeList elementList;
00060 Node employeeNode;
00061 NodeList childList;
00062 Node createdNode;
00063 Node textNode;
00064 doc = load("staff");
00065 elementList = doc.getElementsByTagName("employee");
00066 employeeNode = elementList.item(1);
00067 childList = employeeNode.getChildNodes();
00068 createdNode = doc.createElement("text3");
00069 employeeNode = employeeNode.appendChild(createdNode);
00070
00071 if(
00072 isIgnoringElementContentWhitespace()
00073 ) {
00074 assertSize("elementCountNoWhitespace",7,childList);
00075
00076 }
00077
00078 else {
00079 assertSize("elementCountWhitespace",14,childList);
00080
00081 }
00082
00083 }
|
1.2.13.1 written by Dimitri van Heesch,
© 1997-2001