Main Page   Packages   Class Hierarchy   Compound List   File List   Compound Members  

characterdatareplacedatabegining Class Reference

Inherits DOMTestCase.

List of all members.

Public Methods

 characterdatareplacedatabegining (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 in the middle 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=5 and count=5 and arg="South". The method should replace characters five thru 9 of the character data with "South".

Author:
NIST , Mary Brady
See also:
http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-E5CBA7FB

Definition at line 48 of file characterdatareplacedatabegining.java.


Constructor & Destructor Documentation

characterdatareplacedatabegining::characterdatareplacedatabegining DOMTestDocumentBuilderFactory    factory [inline]
 

Definition at line 50 of file characterdatareplacedatabegining.java.

00051  {
00052       super(factory);
00053 
00054    }


Member Function Documentation

String characterdatareplacedatabegining::getTargetURI   [inline, virtual]
 

Reimplemented from DOMTest.

Definition at line 71 of file characterdatareplacedatabegining.java.

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

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

Definition at line 74 of file characterdatareplacedatabegining.java.

References DOMTestCase::doMain().

00074                                           {
00075         DOMTestCase.doMain(characterdatareplacedatabegining.class,args);
00076    }

void characterdatareplacedatabegining::runTest   [inline, virtual]
 

Reimplemented from DOMTestCase.

Definition at line 56 of file characterdatareplacedatabegining.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("address");
00064       nameNode = elementList.item(0);
00065       child = (CharacterData)nameNode.getFirstChild();
00066       child.replaceData(0,4,"2500");
00067       childData = child.getData();
00068       assertEquals("characterdataReplaceDataBeginingAssert","2500 North Ave. Dallas, Texas 98551",childData);
00069       
00070    }


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