Main Page   Packages   Class Hierarchy   Compound List   File List   Compound Members  

namednodemapreturnfirstitem Class Reference

Inherits DOMTestCase.

List of all members.

Public Methods

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

Static Public Methods

void main (String[] args)


Detailed Description

The "item(index)" method returns the indexth item in the map(test for first item).

Retrieve the second employee and create a NamedNodeMap listing of the attributes of the last child. Since the DOM does not specify an order of these nodes the contents of the FIRST node can contain either "domestic" or "street". The test should return "true" if the FIRST node is either of these values.

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

Definition at line 47 of file namednodemapreturnfirstitem.java.


Constructor & Destructor Documentation

namednodemapreturnfirstitem::namednodemapreturnfirstitem DOMTestDocumentBuilderFactory    factory [inline]
 

Definition at line 49 of file namednodemapreturnfirstitem.java.

00050  {
00051       super(factory);
00052 
00053    }


Member Function Documentation

String namednodemapreturnfirstitem::getTargetURI   [inline, virtual]
 

Reimplemented from DOMTest.

Definition at line 74 of file namednodemapreturnfirstitem.java.

00074                                 {
00075       return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/namednodemapreturnfirstitem";
00076    }

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

Definition at line 77 of file namednodemapreturnfirstitem.java.

References DOMTestCase::doMain().

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

void namednodemapreturnfirstitem::runTest   [inline, virtual]
 

Reimplemented from DOMTestCase.

Definition at line 55 of file namednodemapreturnfirstitem.java.

References DOMTestCase::assertTrue(), DOMTestCase::equals(), and DOMTest::load().

00055                                                     {
00056       Document doc;
00057       NodeList elementList;
00058       Node testAddress;
00059       NamedNodeMap attributes;
00060       Node child;
00061       String name;
00062       doc = load("staff");
00063       elementList = doc.getElementsByTagName("address");
00064       testAddress = elementList.item(1);
00065       attributes = testAddress.getAttributes();
00066       child = attributes.item(0);
00067       name = child.getNodeName();
00068         assertTrue("namednodemapReturnFirstItemAssert",
00069       
00070         (equals("domestic",name) | equals("street",name))
00071 );
00072       
00073    }


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