Main Page   Packages   Class Hierarchy   Compound List   File List   Compound Members  

nodegetfirstchild Class Reference

Inherits DOMTestCase.

List of all members.

Public Methods

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

Static Public Methods

void main (String[] args)


Detailed Description

The "getFirstChild()" method returns the first child of this node.

Retrieve the second employee and invoke the "getFirstChild()" method. The NodeName returned should be "text".

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

Definition at line 44 of file nodegetfirstchild.java.


Constructor & Destructor Documentation

nodegetfirstchild::nodegetfirstchild DOMTestDocumentBuilderFactory    factory [inline]
 

Definition at line 46 of file nodegetfirstchild.java.

00047  {
00048       super(factory);
00049 
00050    }


Member Function Documentation

String nodegetfirstchild::getTargetURI   [inline, virtual]
 

Reimplemented from DOMTest.

Definition at line 77 of file nodegetfirstchild.java.

00077                                 {
00078       return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/nodegetfirstchild";
00079    }

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

Definition at line 80 of file nodegetfirstchild.java.

References DOMTestCase::doMain().

00080                                           {
00081         DOMTestCase.doMain(nodegetfirstchild.class,args);
00082    }

void nodegetfirstchild::runTest   [inline, virtual]
 

Reimplemented from DOMTestCase.

Definition at line 52 of file nodegetfirstchild.java.

References DOMTestCase::assertEquals(), DOMTest::isIgnoringElementContentWhitespace(), and DOMTest::load().

00052                                                     {
00053       Document doc;
00054       NodeList elementList;
00055       Node employeeNode;
00056       Node fchildNode;
00057       String childName;
00058       doc = load("staff");
00059       elementList = doc.getElementsByTagName("employee");
00060       employeeNode = elementList.item(1);
00061       fchildNode = employeeNode.getFirstChild();
00062       childName = fchildNode.getNodeName();
00063       
00064         if(
00065         isIgnoringElementContentWhitespace()
00066         ) {
00067         assertEquals("nowhitespace","employeeId",childName);
00068       
00069         }
00070         
00071                 else {
00072                         assertEquals("whitespace","#text",childName);
00073       
00074                 }
00075         
00076    }


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