Main Page   Packages   Class Hierarchy   Compound List   File List   Compound Members  

nodeelementnodeattributes Class Reference

Inherits DOMTestCase.

List of all members.

Public Methods

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

Static Public Methods

void main (String[] args)


Detailed Description

The "getAttributes()" method invoked on an Element Node returns a NamedNodeMap containing the attributes of this node.

Retrieve the last child of the third employee and invoke the "getAttributes()" method. It should return a NamedNodeMap containing the attributes of the Element node.

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

Definition at line 46 of file nodeelementnodeattributes.java.


Constructor & Destructor Documentation

nodeelementnodeattributes::nodeelementnodeattributes DOMTestDocumentBuilderFactory    factory [inline]
 

Definition at line 48 of file nodeelementnodeattributes.java.

00049  {
00050       super(factory);
00051 
00052    }


Member Function Documentation

String nodeelementnodeattributes::getTargetURI   [inline, virtual]
 

Reimplemented from DOMTest.

Definition at line 80 of file nodeelementnodeattributes.java.

00080                                 {
00081       return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/nodeelementnodeattributes";
00082    }

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

Definition at line 83 of file nodeelementnodeattributes.java.

References DOMTestCase::doMain().

00083                                           {
00084         DOMTestCase.doMain(nodeelementnodeattributes.class,args);
00085    }

void nodeelementnodeattributes::runTest   [inline, virtual]
 

Reimplemented from DOMTestCase.

Definition at line 54 of file nodeelementnodeattributes.java.

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

00054                                                     {
00055       Document doc;
00056       NodeList elementList;
00057       Element testAddr;
00058       NamedNodeMap addrAttr;
00059       Node attrNode;
00060       String attrName;
00061       Collection attrList = new ArrayList();
00062       
00063       Collection expected = new ArrayList();
00064       expected.add("domestic");
00065       expected.add("street");
00066       
00067       doc = load("staff");
00068       elementList = doc.getElementsByTagName("address");
00069       testAddr = (Element)elementList.item(2);
00070       addrAttr = testAddr.getAttributes();
00071       for(int _index = 0; _index < addrAttr.getLength();_index++) {
00072       attrNode = ( Node ) addrAttr.item(_index);
00073            attrName = attrNode.getNodeName();
00074       attrList.add(attrName);
00075       
00076         }
00077       assertEquals("nodeElementNodeValueAssert1",expected,attrList);
00078       
00079    }


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