Main Page Packages Class Hierarchy Compound List File List Compound Members

# nodegetownerdocument Class Reference

Inherits DOMTestCase.

List of all members.

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

## Detailed Description

The "getOwnerDocument()" method returns the Document object associated with this node.

Retrieve the second employee and examine Document returned by the "getOwnerDocument()" method. Invoke the "getDocumentElement()" on the Document which will return an Element that is equal to "staff".

Author:
  NIST , Mary Brady

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

Definition at line 45 of file nodegetownerdocument.java.

## Constructor & Destructor Documentation

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

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

## Member Function Documentation

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

| Reimplemented from DOMTest. Definition at line 69 of file nodegetownerdocument.java.
    00069                                 {
    00070       return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/nodegetownerdocument";
    00071    }

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

| Definition at line 72 of file nodegetownerdocument.java. References DOMTestCase::doMain().
    00072                                           {
    00073         DOMTestCase.doMain(nodegetownerdocument.class,args);
    00074    }

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

| Reimplemented from DOMTestCase. Definition at line 53 of file nodegetownerdocument.java. References DOMTestCase::assertEquals(), and DOMTest::load().
    00053                                                     {
    00054       Document doc;
    00055       NodeList elementList;
    00056       Node docNode;
    00057       Document ownerDocument;
    00058       Element docElement;
    00059       String elementName;
    00060       doc = load("staff");
    00061       elementList = doc.getElementsByTagName("employee");
    00062       docNode = elementList.item(1);
    00063       ownerDocument = docNode.getOwnerDocument();
    00064       docElement = ownerDocument.getDocumentElement();
    00065       elementName = docElement.getNodeName();
    00066       assertEquals("nodeGetOwnerDocumentAssert1","staff",elementName);
    00067
    00068    }

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

- nodegetownerdocument.java