Main Page Packages Class Hierarchy Compound List File List Compound Members

# attrparentnodenull Class Reference

Inherits DOMTestCase.

List of all members.

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

## Detailed Description

The "getParentNode()" method for an Attr node should return null. Retrieve the attribute named "domestic" from the last child of the first employee and examine its parentNode attribute. This test also 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-1060184317 , http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-637646024

Definition at line 43 of file attrparentnodenull.java.

## Constructor & Destructor Documentation

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

| Definition at line 45 of file attrparentnodenull.java.
    00046  {
    00047       super(factory);
    00048
    00049    }

## Member Function Documentation

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

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

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

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

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

| Reimplemented from DOMTestCase. Definition at line 51 of file attrparentnodenull.java. References DOMTestCase::assertNull(), and DOMTest::load().
    00051                                                     {
    00052       Document doc;
    00053       NodeList addressList;
    00054       Node testNode;
    00055       NamedNodeMap attributes;
    00056       Attr domesticAttr;
    00057       Node s;
    00058       doc = load("staff");
    00059       addressList = doc.getElementsByTagName("address");
    00060       testNode = addressList.item(0);
    00061       attributes = testNode.getAttributes();
    00062       domesticAttr = (Attr)attributes.getNamedItem("domestic");
    00063       s = domesticAttr.getParentNode();
    00064       assertNull("attrParentNodeNullAssert",s);
    00065
    00066    }

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

- attrparentnodenull.java