Main Page   Packages   Class Hierarchy   Compound List   File List   Compound Members  

attrname Class Reference

Inherits DOMTestCase.

List of all members.

Public Methods

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

Static Public Methods

void main (String[] args)


Detailed Description

The getNodeName() method of an Attribute node. Retrieve the attribute named street from the last child of of the second employee and examine its NodeName. This test uses the getNamedItem(name) method from the NamedNodeMap interface.

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

Definition at line 44 of file attrname.java.


Constructor & Destructor Documentation

attrname::attrname DOMTestDocumentBuilderFactory    factory [inline]
 

Definition at line 46 of file attrname.java.

00047  {
00048       super(factory);
00049 
00050    }


Member Function Documentation

String attrname::getTargetURI   [inline, virtual]
 

Reimplemented from DOMTest.

Definition at line 70 of file attrname.java.

00070                                 {
00071       return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/attrname";
00072    }

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

Definition at line 73 of file attrname.java.

References DOMTestCase::doMain().

00073                                           {
00074         DOMTestCase.doMain(attrname.class,args);
00075    }

void attrname::runTest   [inline, virtual]
 

Reimplemented from DOMTestCase.

Definition at line 52 of file attrname.java.

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

00052                                                     {
00053       Document doc;
00054       NodeList addressList;
00055       Node testNode;
00056       NamedNodeMap attributes;
00057       Attr streetAttr;
00058       String name;
00059       doc = load("staff");
00060       addressList = doc.getElementsByTagName("address");
00061       testNode = addressList.item(1);
00062       attributes = testNode.getAttributes();
00063       streetAttr = (Attr)attributes.getNamedItem("street");
00064       name = streetAttr.getNodeName();
00065       assertEquals("nodeName","street",name);
00066       name = streetAttr.getName();
00067       assertEquals("name","street",name);
00068       
00069    }


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