Main Page Packages Class Hierarchy Compound List File List Compound Members

# elementgetattributenode Class Reference

Inherits DOMTestCase.

List of all members.

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

## Detailed Description

The "getAttributeNode(name)" method retrieves an attribute node by name.

Retrieve the attribute "domestic" from the last child of the first employee. Since the method returns an Attr object, the "name" can be examined to ensure the proper attribute was retrieved.

Author:
  NIST , Mary Brady

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

Definition at line 45 of file elementgetattributenode.java.

## Constructor & Destructor Documentation

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

| Definition at line 47 of file elementgetattributenode.java.
    00048  {
    00049       super(factory);
    00050
    00051    }

## Member Function Documentation

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

| Reimplemented from DOMTest. Definition at line 67 of file elementgetattributenode.java.
    00067                                 {
    00068       return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/elementgetattributenode";
    00069    }

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

| Definition at line 70 of file elementgetattributenode.java. References DOMTestCase::doMain().
    00070                                           {
    00071         DOMTestCase.doMain(elementgetattributenode.class,args);
    00072    }

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

| Reimplemented from DOMTestCase. Definition at line 53 of file elementgetattributenode.java. References DOMTestCase::assertEquals(), and DOMTest::load().
    00053                                                     {
    00054       Document doc;
    00055       NodeList elementList;
    00056       Element testEmployee;
    00057       Attr domesticAttr;
    00058       String name;
    00059       doc = load("staff");
    00060       elementList = doc.getElementsByTagName("address");
    00061       testEmployee = (Element)elementList.item(0);
    00062       domesticAttr = testEmployee.getAttributeNode("domestic");
    00063       name = domesticAttr.getNodeName();
    00064       assertEquals("elementGetAttributeNodeAssert","domestic",name);
    00065
    00066    }

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

- elementgetattributenode.java