Main Page   Packages   Class Hierarchy   Compound List   File List   Compound Members  

nodechildnodesappendchild Class Reference

Inherits DOMTestCase.

List of all members.

Public Methods

 nodechildnodesappendchild (DOMTestDocumentBuilderFactory factory)
void runTest () throws java.lang.Throwable
String getTargetURI ()

Static Public Methods

void main (String[] args)


Detailed Description

The NodeList returned by the "getChildNodes()" method is live. Changes on the node's children are immediately reflected on the nodes returned in the NodeList.

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.

Author:
NIST , Mary Brady
See also:
http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-1451460987 , http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-184E7107

Definition at line 49 of file nodechildnodesappendchild.java.


Constructor & Destructor Documentation

nodechildnodesappendchild::nodechildnodesappendchild DOMTestDocumentBuilderFactory    factory [inline]
 

Definition at line 51 of file nodechildnodesappendchild.java.

00052  {
00053       super(factory);
00054 
00055    }


Member Function Documentation

String nodechildnodesappendchild::getTargetURI   [inline, virtual]
 

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    }

void nodechildnodesappendchild::main String    args[] [inline, static]
 

Definition at line 87 of file nodechildnodesappendchild.java.

References DOMTestCase::doMain().

00087                                           {
00088         DOMTestCase.doMain(nodechildnodesappendchild.class,args);
00089    }

void nodechildnodesappendchild::runTest   [inline, virtual]
 

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    }


The documentation for this class was generated from the following file:
Generated on Thu Feb 14 19:46:59 2002 for DOM Level 1 Core Test Suite by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001