Main Page Packages Class Hierarchy Compound List File List Compound Members

# nodeappendchildchildexists Class Reference

Inherits DOMTestCase.

List of all members.

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

## Detailed Description

If the "newChild" is already in the tree, it is first removed before the new one is appended.

Retrieve the first child of the second employee and append the first child to the end of the list. After the "appendChild(newChild)" method is invoked the first child should be the one that was second and the last child should be the one that was first.

Author:
  NIST , Mary Brady

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

Definition at line 46 of file nodeappendchildchildexists.java.

## Constructor & Destructor Documentation

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

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

## Member Function Documentation

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

| Reimplemented from DOMTest. Definition at line 89 of file nodeappendchildchildexists.java.
    00089                                 {
    00090       return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/nodeappendchildchildexists";
    00091    }

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

| Definition at line 92 of file nodeappendchildchildexists.java. References DOMTestCase::doMain().
    00092                                           {
    00093         DOMTestCase.doMain(nodeappendchildchildexists.class,args);
    00094    }

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

| Reimplemented from DOMTestCase. Definition at line 54 of file nodeappendchildchildexists.java. References DOMTestCase::assertEquals(), DOMTest::isIgnoringElementContentWhitespace(), and DOMTest::load().
    00054                                                     {
    00055       Document doc;
    00056       NodeList elementList;
    00057       Node childNode;
    00058       Node newChild;
    00059       Node lchild;
    00060       Node fchild;
    00061       String lchildName;
    00062       String fchildName;
    00063       Node appendedChild;
    00064       doc = load("staff");
    00065       elementList = doc.getElementsByTagName("employee");
    00066       childNode = elementList.item(1);
    00067       newChild = childNode.getFirstChild();
    00068       appendedChild = childNode.appendChild(newChild);
    00069       fchild = childNode.getFirstChild();
    00070       fchildName = fchild.getNodeName();
    00071       lchild = childNode.getLastChild();
    00072       lchildName = lchild.getNodeName();
    00073
    00074         if(
    00075         isIgnoringElementContentWhitespace()
    00076         ) {
    00077         assertEquals("assert1_nowhitespace","name",fchildName);
    00078       assertEquals("assert2_nowhitespace","employeeId",lchildName);
    00079
    00080         }
    00081
    00082                 else {
    00083                         assertEquals("assert1","employeeId",fchildName);
    00084       assertEquals("assert2","#text",lchildName);
    00085
    00086                 }
    00087
    00088    }

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

- nodeappendchildchildexists.java