Main Page Packages Class Hierarchy Compound List File List Compound Members

# nodeparentnode Class Reference

Inherits DOMTestCase.

List of all members.

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

## Detailed Description

The "getParentNode()" method returns the parent of this node.

Retrieve the second employee and invoke the "getParentNode()" method on this node. It should be set to "staff".

Author:
  NIST , Mary Brady

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

Definition at line 44 of file nodeparentnode.java.

## Constructor & Destructor Documentation

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

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

## Member Function Documentation

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

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

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

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

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

| Reimplemented from DOMTestCase. Definition at line 52 of file nodeparentnode.java. References DOMTestCase::assertEquals(), and DOMTest::load().
    00052                                                     {
    00053       Document doc;
    00054       NodeList elementList;
    00055       Node employeeNode;
    00056       Node parentNode;
    00057       String parentName;
    00058       doc = load("staff");
    00059       elementList = doc.getElementsByTagName("employee");
    00060       employeeNode = elementList.item(1);
    00061       parentNode = employeeNode.getParentNode();
    00062       parentName = parentNode.getNodeName();
    00063       assertEquals("nodeParentNodeAssert1","staff",parentName);
    00064
    00065    }

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

- nodeparentnode.java