Main Page Packages Class Hierarchy Compound List File List Compound Members

# textsplittextone Class Reference

Inherits DOMTestCase.

List of all members.

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

## Detailed Description

The "splitText(offset)" method breaks the Text node into two Text nodes at the specified offset keeping each node as siblings in the tree.

Retrieve the textual data from the second child of the third employee and invoke the "splitText(offset)" method. The method splits the Text node into two new sibling Text nodes keeping both of them in the tree. This test checks the "nextSibling()" method of the original node to ensure that the two nodes are indeed siblings.

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 textsplittextone.java.

## Constructor & Destructor Documentation

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

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

## Member Function Documentation

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

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

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

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

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

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

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

- textsplittextone.java