Main Page Packages Class Hierarchy Compound List File List Compound Members

# nodeinsertbeforenodename Class Reference

Inherits DOMTestCase.

List of all members.

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

## Detailed Description

The "insertBefore(newChild,refchild)" method returns the node being inserted.

Insert an Element node before the fourth child of the second employee and check the node returned from the "insertBefore(newChild,refChild)" method. The node returned should be "newChild".

Author:
  NIST , Mary Brady

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

Definition at line 46 of file nodeinsertbeforenodename.java.

## Constructor & Destructor Documentation

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

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

## Member Function Documentation

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

| Reimplemented from DOMTest. Definition at line 74 of file nodeinsertbeforenodename.java.
    00074                                 {
    00075       return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/nodeinsertbeforenodename";
    00076    }

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

| Definition at line 77 of file nodeinsertbeforenodename.java. References DOMTestCase::doMain().
    00077                                           {
    00078         DOMTestCase.doMain(nodeinsertbeforenodename.class,args);
    00079    }

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

| Reimplemented from DOMTestCase. Definition at line 54 of file nodeinsertbeforenodename.java. References DOMTestCase::assertEquals(), and DOMTest::load().
    00054                                                     {
    00055       Document doc;
    00056       NodeList elementList;
    00057       Node employeeNode;
    00058       NodeList childList;
    00059       Node refChild;
    00060       Node newChild;
    00061       Node insertedNode;
    00062       String childName;
    00063       doc = load("staff");
    00064       elementList = doc.getElementsByTagName("employee");
    00065       employeeNode = elementList.item(1);
    00066       childList = employeeNode.getChildNodes();
    00067       refChild = childList.item(3);
    00068       newChild = doc.createElement("newChild");
    00069       insertedNode = employeeNode.insertBefore(newChild,refChild);
    00070       childName = insertedNode.getNodeName();
    00071       assertEquals("nodeInsertBeforeNodeNameAssert1","newChild",childName);
    00072
    00073    }

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

- nodeinsertbeforenodename.java