Main Page Packages Class Hierarchy Compound List File List Compound Members

# elementretrieveattrvalue Class Reference

Inherits DOMTestCase.

List of all members.

## Public Methods
| elementretrieveattrvalue (DOMTestDocumentBuilderFactory factory)
void | runTest () throws java.lang.Throwable
String | getTargetURI ()
## Static Public Methods
void | main (String[] args)

## Detailed Description

The "getAttribute(name)" method returns an attribute value by name.

Retrieve the second address element, then invoke the 'getAttribute("street")' method. This should return the value of the attribute("No").

Author:
  NIST , Mary Brady

See also:
  http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-666EE0F9

Definition at line 44 of file elementretrieveattrvalue.java.

## Constructor & Destructor Documentation

elementretrieveattrvalue::elementretrieveattrvalue | ( | DOMTestDocumentBuilderFactory | factory | ) | `[inline]`

| Definition at line 46 of file elementretrieveattrvalue.java.
    00047  {
    00048       super(factory);
    00049
    00050    }

## Member Function Documentation

String elementretrieveattrvalue::getTargetURI | ( |  | ) | `[inline, virtual]`

| Reimplemented from DOMTest. Definition at line 64 of file elementretrieveattrvalue.java.
    00064                                 {
    00065       return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/elementretrieveattrvalue";
    00066    }

void elementretrieveattrvalue::main | ( | String | args[] | ) | `[inline, static]`

| Definition at line 67 of file elementretrieveattrvalue.java. References DOMTestCase::doMain().
    00067                                           {
    00068         DOMTestCase.doMain(elementretrieveattrvalue.class,args);
    00069    }

void elementretrieveattrvalue::runTest | ( |  | ) | `[inline, virtual]`

| Reimplemented from DOMTestCase. Definition at line 52 of file elementretrieveattrvalue.java. References DOMTestCase::assertEquals(), and DOMTest::load().
    00052                                                     {
    00053       Document doc;
    00054       NodeList elementList;
    00055       Element testAddress;
    00056       String attrValue;
    00057       doc = load("staff");
    00058       elementList = doc.getElementsByTagName("address");
    00059       testAddress = (Element)elementList.item(2);
    00060       attrValue = testAddress.getAttribute("street");
    00061       assertEquals("attrValue","No",attrValue);
    00062
    00063    }

The documentation for this class was generated from the following file:

- elementretrieveattrvalue.java