Main Page Packages Class Hierarchy Compound List File List Compound Members

# characterdatainsertdatabeginning Class Reference

Inherits DOMTestCase.

List of all members.

## Public Methods
| characterdatainsertdatabeginning (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 at the beginning 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=0 and arg="Mss.". The method should insert the string "Mss." at position 0. The new value of the character data should be "Mss. Margaret Martin".

Author:
  NIST , Mary Brady

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

Definition at line 48 of file characterdatainsertdatabeginning.java.

## Constructor & Destructor Documentation

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

| Definition at line 50 of file characterdatainsertdatabeginning.java.
    00051  {
    00052       super(factory);
    00053
    00054    }

## Member Function Documentation

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

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

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

| Definition at line 74 of file characterdatainsertdatabeginning.java. References DOMTestCase::doMain().
    00074                                           {
    00075         DOMTestCase.doMain(characterdatainsertdatabeginning.class,args);
    00076    }

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

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

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

- characterdatainsertdatabeginning.java