Main Page   Packages   Class Hierarchy   Compound List   File List   Compound Members  

nodegetlastchild Class Reference

Inherits DOMTestCase.

List of all members.

Public Methods

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

Static Public Methods

void main (String[] args)


Detailed Description

The "getLastChild()" method returns the last child of this node.

Retrieve the second employee and invoke the "getLastChild()" 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-61AD09FB

Definition at line 44 of file nodegetlastchild.java.


Constructor & Destructor Documentation

nodegetlastchild::nodegetlastchild DOMTestDocumentBuilderFactory    factory [inline]
 

Definition at line 46 of file nodegetlastchild.java.

00047  {
00048       super(factory);
00049 
00050    }


Member Function Documentation

String nodegetlastchild::getTargetURI   [inline, virtual]
 

Reimplemented from DOMTest.

Definition at line 77 of file nodegetlastchild.java.

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

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

Definition at line 80 of file nodegetlastchild.java.

References DOMTestCase::doMain().

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

void nodegetlastchild::runTest   [inline, virtual]
 

Reimplemented from DOMTestCase.

Definition at line 52 of file nodegetlastchild.java.

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

00052                                                     {
00053       Document doc;
00054       NodeList elementList;
00055       Node employeeNode;
00056       Node lchildNode;
00057       String childName;
00058       doc = load("staff");
00059       elementList = doc.getElementsByTagName("employee");
00060       employeeNode = elementList.item(1);
00061       lchildNode = employeeNode.getLastChild();
00062       childName = lchildNode.getNodeName();
00063       
00064         if(
00065         isIgnoringElementContentWhitespace()
00066         ) {
00067         assertEquals("no_whitespace","address",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