Main Page Packages Class Hierarchy Compound List File List Compound Members

# characterdatainsertdatamiddle Class Reference

Inherits DOMTestCase.

List of all members.

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

## Detailed Description

The "insertData(offset,arg)" method will insert a string at the specified character offset. Insert the data in the middle of the character data.

Retrieve the character data from the second child of the first employee. The "insertData(offset,arg)" method is then called with offset=9 and arg="Ann". The method should insert the string "Ann" at position 9. The new value of the character data should be "Margaret Ann Martin".

Author:
  NIST , Mary Brady

See also:
  http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-72AB8359 , http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-3EDB695F

Definition at line 49 of file characterdatainsertdatamiddle.java.

## Constructor & Destructor Documentation

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

| Definition at line 51 of file characterdatainsertdatamiddle.java.
    00052  {
    00053       super(factory);
    00054
    00055    }

## Member Function Documentation

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

| Reimplemented from DOMTest. Definition at line 72 of file characterdatainsertdatamiddle.java.
    00072                                 {
    00073       return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/characterdatainsertdatamiddle";
    00074    }

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

| Definition at line 75 of file characterdatainsertdatamiddle.java. References DOMTestCase::doMain().
    00075                                           {
    00076         DOMTestCase.doMain(characterdatainsertdatamiddle.class,args);
    00077    }

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

| Reimplemented from DOMTestCase. Definition at line 57 of file characterdatainsertdatamiddle.java. References DOMTestCase::assertEquals(), and DOMTest::load().
    00057                                                     {
    00058       Document doc;
    00059       NodeList elementList;
    00060       Node nameNode;
    00061       CharacterData child;
    00062       String childData;
    00063       doc = load("staff");
    00064       elementList = doc.getElementsByTagName("name");
    00065       nameNode = elementList.item(0);
    00066       child = (CharacterData)nameNode.getFirstChild();
    00067       child.insertData(9,"Ann ");
    00068       childData = child.getData();
    00069       assertEquals("characterdataInsertDataMiddleAssert","Margaret Ann Martin",childData);
    00070
    00071    }

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

- characterdatainsertdatamiddle.java