Main Page Packages Class Hierarchy Compound List File List Compound Members

# elementgetattributenodenull Class Reference

Inherits DOMTestCase.

List of all members.

## Public Methods
| elementgetattributenodenull (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. It should return null if the "name" attribute does not exist.

Retrieve the last child of the first employee and attempt to retrieve a non-existing attribute. The method should return "null". The non-existing attribute to be used is "invalidAttribute".

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 46 of file elementgetattributenodenull.java.

## Constructor & Destructor Documentation

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

| Definition at line 48 of file elementgetattributenodenull.java.
    00049  {
    00050       super(factory);
    00051
    00052    }

## Member Function Documentation

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

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

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

| Definition at line 69 of file elementgetattributenodenull.java. References DOMTestCase::doMain().
    00069                                           {
    00070         DOMTestCase.doMain(elementgetattributenodenull.class,args);
    00071    }

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

| Reimplemented from DOMTestCase. Definition at line 54 of file elementgetattributenodenull.java. References DOMTestCase::assertNull(), and DOMTest::load().
    00054                                                     {
    00055       Document doc;
    00056       NodeList elementList;
    00057       Element testEmployee;
    00058       Attr domesticAttr;
    00059       doc = load("staff");
    00060       elementList = doc.getElementsByTagName("address");
    00061       testEmployee = (Element)elementList.item(0);
    00062       domesticAttr = testEmployee.getAttributeNode("invalidAttribute");
    00063       assertNull("elementGetAttributeNodeNullAssert",domesticAttr);
    00064
    00065    }

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

- elementgetattributenodenull.java