Main Page   Packages   Class Hierarchy   Compound List   File List   Compound Members  

elementassociatedattribute Class Reference

Inherits DOMTestCase.

List of all members.

Public Methods

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

Static Public Methods

void main (String[] args)


Detailed Description

Elements may have attributes associated with them.

Retrieve the first attribute from the last child of the first employee and invoke the "getSpecified()" method. This test is only intended to show that Elements can actually have attributes. 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-84CF096

Definition at line 46 of file elementassociatedattribute.java.


Constructor & Destructor Documentation

elementassociatedattribute::elementassociatedattribute DOMTestDocumentBuilderFactory    factory [inline]
 

Definition at line 48 of file elementassociatedattribute.java.

00049  {
00050       super(factory);
00051 
00052    }


Member Function Documentation

String elementassociatedattribute::getTargetURI   [inline, virtual]
 

Reimplemented from DOMTest.

Definition at line 70 of file elementassociatedattribute.java.

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

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

Definition at line 73 of file elementassociatedattribute.java.

References DOMTestCase::doMain().

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

void elementassociatedattribute::runTest   [inline, virtual]
 

Reimplemented from DOMTestCase.

Definition at line 54 of file elementassociatedattribute.java.

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

00054                                                     {
00055       Document doc;
00056       NodeList elementList;
00057       Node testEmployee;
00058       NamedNodeMap attributes;
00059       Attr domesticAttr;
00060       boolean specified;
00061       doc = load("staff");
00062       elementList = doc.getElementsByTagName("address");
00063       testEmployee = elementList.item(0);
00064       attributes = testEmployee.getAttributes();
00065       domesticAttr = (Attr)attributes.getNamedItem("domestic");
00066       specified = domesticAttr.getSpecified();
00067       assertTrue("elementAssociatedAttributeAssert",specified);
00068       
00069    }


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