Main Page   Packages   Class Hierarchy   Compound List   File List   Compound Members  

nodelistindexequalzero Class Reference

Inherits DOMTestCase.

List of all members.

Public Methods

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

Static Public Methods

void main (String[] args)


Detailed Description

The items in the list are accessible via an integral index starting from zero. (Index equal 0)

Create a list of all the children elements of the third employee and access its first child by using an index of 0. This should result in the whitspace before "employeeId" being selected (employeeId when ignoring whitespace). Further we evaluate its content(by using the "getNodeName()" method) to ensure the proper element was accessed.

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

Definition at line 49 of file nodelistindexequalzero.java.


Constructor & Destructor Documentation

nodelistindexequalzero::nodelistindexequalzero DOMTestDocumentBuilderFactory    factory [inline]
 

Definition at line 51 of file nodelistindexequalzero.java.

00052  {
00053       super(factory);
00054 
00055    }


Member Function Documentation

String nodelistindexequalzero::getTargetURI   [inline, virtual]
 

Reimplemented from DOMTest.

Definition at line 84 of file nodelistindexequalzero.java.

00084                                 {
00085       return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/nodelistindexequalzero";
00086    }

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

Definition at line 87 of file nodelistindexequalzero.java.

References DOMTestCase::doMain().

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

void nodelistindexequalzero::runTest   [inline, virtual]
 

Reimplemented from DOMTestCase.

Definition at line 57 of file nodelistindexequalzero.java.

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

00057                                                     {
00058       Document doc;
00059       NodeList elementList;
00060       Node employeeNode;
00061       NodeList employeeList;
00062       Node child;
00063       String childName;
00064       doc = load("staff");
00065       elementList = doc.getElementsByTagName("employee");
00066       employeeNode = elementList.item(2);
00067       employeeList = employeeNode.getChildNodes();
00068       child = employeeList.item(0);
00069       childName = child.getNodeName();
00070       
00071         if(
00072         isIgnoringElementContentWhitespace()
00073         ) {
00074         assertEquals("item0NoWhitespace","employeeId",childName);
00075       
00076         }
00077         
00078                 else {
00079                         assertEquals("item0Whitespace","#text",childName);
00080       
00081                 }
00082         
00083    }


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