Main Page   Packages   Class Hierarchy   Compound List   File List   Compound Members  

characterdatareplacedataend Class Reference

Inherits DOMTestCase.

List of all members.

Public Methods

 characterdatareplacedataend (DOMTestDocumentBuilderFactory factory)
void runTest () throws java.lang.Throwable
String getTargetURI ()

Static Public Methods

void main (String[] args)


Detailed Description

The "replaceData(offset,count,arg)" method replaces the characters starting at the specified offset with the specified string. Test for replacement at the end of the data.

Retrieve the character data from the last child of the first employee. The "replaceData(offset,count,arg)" method is then called with offset=30 and count=5 and arg="98665". The method should replace characters 30 thru 34 of the character data with "98665".

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-E5CBA7FB

Definition at line 49 of file characterdatareplacedataend.java.


Constructor & Destructor Documentation

characterdatareplacedataend::characterdatareplacedataend DOMTestDocumentBuilderFactory    factory [inline]
 

Definition at line 51 of file characterdatareplacedataend.java.

00052  {
00053       super(factory);
00054 
00055    }


Member Function Documentation

String characterdatareplacedataend::getTargetURI   [inline, virtual]
 

Reimplemented from DOMTest.

Definition at line 72 of file characterdatareplacedataend.java.

00072                                 {
00073       return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/characterdatareplacedataend";
00074    }

void characterdatareplacedataend::main String    args[] [inline, static]
 

Definition at line 75 of file characterdatareplacedataend.java.

References DOMTestCase::doMain().

00075                                           {
00076         DOMTestCase.doMain(characterdatareplacedataend.class,args);
00077    }

void characterdatareplacedataend::runTest   [inline, virtual]
 

Reimplemented from DOMTestCase.

Definition at line 57 of file characterdatareplacedataend.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("address");
00065       nameNode = elementList.item(0);
00066       child = (CharacterData)nameNode.getFirstChild();
00067       child.replaceData(30,5,"98665");
00068       childData = child.getData();
00069       assertEquals("characterdataReplaceDataEndAssert","1230 North Ave. Dallas, Texas 98665",childData);
00070       
00071    }


The documentation for this class was generated from the following file:
Generated on Thu Feb 14 19:46:38 2002 for DOM Level 1 Core Test Suite by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001