Main Page Packages Class Hierarchy Compound List File List Compound Members

# textsplittexttwo Class Reference

Inherits DOMTestCase.

List of all members.

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

## Detailed Description

After the "splitText(offset)" method breaks the Text node into two Text nodes, the original node contains all the content up to the offset point.

Retrieve the textual data from the second child of the third employee and invoke the "splitText(offset)" method. The original Text node should contain all the content up to the offset point. The "getNodeValue()" method is called to check that the original node now contains the first five characters.

Author:
  NIST , Mary Brady

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

Definition at line 48 of file textsplittexttwo.java.

## Constructor & Destructor Documentation

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

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

## Member Function Documentation

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

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

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

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

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

| Reimplemented from DOMTestCase. Definition at line 56 of file textsplittexttwo.java. References DOMTestCase::assertEquals(), and DOMTest::load().
    00056                                                     {
    00057       Document doc;
    00058       NodeList elementList;
    00059       Node nameNode;
    00060       Text textNode;
    00061       Text splitNode;
    00062       String value;
    00063       doc = load("staff");
    00064       elementList = doc.getElementsByTagName("name");
    00065       nameNode = elementList.item(2);
    00066       textNode = (Text)nameNode.getFirstChild();
    00067       splitNode = textNode.splitText(5);
    00068       value = textNode.getNodeValue();
    00069       assertEquals("textSplitTextTwoAssert","Roger",value);
    00070
    00071    }

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

- textsplittexttwo.java