Main Page Packages Class Hierarchy Compound List File List Compound Members

# nodegetprevioussibling Class Reference

Inherits DOMTestCase.

List of all members.

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

## Detailed Description

The "getPreviousSibling()" method returns the node immediately preceding this node.

Retrieve the second child of the second employee and invoke the "getPreviousSibling()" method. It should return a node with a NodeName of "text".

Author:
  NIST , Mary Brady

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

Definition at line 44 of file nodegetprevioussibling.java.

## Constructor & Destructor Documentation

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

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

## Member Function Documentation

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

| Reimplemented from DOMTest. Definition at line 77 of file nodegetprevioussibling.java.
    00077                                 {
    00078       return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/nodegetprevioussibling";
    00079    }

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

| Definition at line 80 of file nodegetprevioussibling.java. References DOMTestCase::doMain().
    00080                                           {
    00081         DOMTestCase.doMain(nodegetprevioussibling.class,args);
    00082    }

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

| Reimplemented from DOMTestCase. Definition at line 52 of file nodegetprevioussibling.java. References DOMTestCase::assertEquals(), DOMTest::isIgnoringElementContentWhitespace(), and DOMTest::load().
    00052                                                     {
    00053       Document doc;
    00054       NodeList elementList;
    00055       Node nameNode;
    00056       Node psNode;
    00057       String psName;
    00058       doc = load("staff");
    00059       elementList = doc.getElementsByTagName("name");
    00060       nameNode = elementList.item(1);
    00061       psNode = nameNode.getPreviousSibling();
    00062       psName = psNode.getNodeName();
    00063
    00064         if(
    00065         isIgnoringElementContentWhitespace()
    00066         ) {
    00067         assertEquals("nowhitespace","employeeId",psName);
    00068
    00069         }
    00070
    00071                 else {
    00072                         assertEquals("whitespace","#text",psName);
    00073
    00074                 }
    00075
    00076    }

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

- nodegetprevioussibling.java