Main Page   Packages   Class Hierarchy   Compound List   File List   Compound Members  

namednodemapnumberofnodes Class Reference

Inherits DOMTestCase.

List of all members.

Public Methods

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

Static Public Methods

void main (String[] args)


Detailed Description

The "getLength()" method returns the number of nodes in the map.

Retrieve the second employee and create a NamedNodeMap listing of the attributes of the last child. Once the list is created an invocation of the "getLength()" method is executed. The number of nodes should be 2.

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

Definition at line 46 of file namednodemapnumberofnodes.java.


Constructor & Destructor Documentation

namednodemapnumberofnodes::namednodemapnumberofnodes DOMTestDocumentBuilderFactory    factory [inline]
 

Definition at line 48 of file namednodemapnumberofnodes.java.

00049  {
00050       super(factory);
00051 
00052    }


Member Function Documentation

String namednodemapnumberofnodes::getTargetURI   [inline, virtual]
 

Reimplemented from DOMTest.

Definition at line 68 of file namednodemapnumberofnodes.java.

00068                                 {
00069       return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/namednodemapnumberofnodes";
00070    }

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

Definition at line 71 of file namednodemapnumberofnodes.java.

References DOMTestCase::doMain().

00071                                           {
00072         DOMTestCase.doMain(namednodemapnumberofnodes.class,args);
00073    }

void namednodemapnumberofnodes::runTest   [inline, virtual]
 

Reimplemented from DOMTestCase.

Definition at line 54 of file namednodemapnumberofnodes.java.

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

00054                                                     {
00055       Document doc;
00056       NodeList elementList;
00057       Node testEmployee;
00058       NamedNodeMap attributes;
00059       int length;
00060       doc = load("staff");
00061       elementList = doc.getElementsByTagName("address");
00062       testEmployee = elementList.item(2);
00063       attributes = testEmployee.getAttributes();
00064       length = (int)attributes.getLength();
00065       assertEquals("length",2,length);
00066       
00067    }


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