Main Page   Packages   Class Hierarchy   Compound List   File List   Compound Members  

nodeappendchild Class Reference

Inherits DOMTestCase.

List of all members.

Public Methods

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

Static Public Methods

void main (String[] args)


Detailed Description

The "appendChild(newChild)" method adds the node "newChild" to the end of the list of children of the node.

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".

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

Definition at line 46 of file nodeappendchild.java.


Constructor & Destructor Documentation

nodeappendchild::nodeappendchild DOMTestDocumentBuilderFactory    factory [inline]
 

Definition at line 48 of file nodeappendchild.java.

00049  {
00050       super(factory);
00051 
00052    }


Member Function Documentation

String nodeappendchild::getTargetURI   [inline, virtual]
 

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    }

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

Definition at line 77 of file nodeappendchild.java.

References DOMTestCase::doMain().

00077                                           {
00078         DOMTestCase.doMain(nodeappendchild.class,args);
00079    }

void nodeappendchild::runTest   [inline, virtual]
 

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    }


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