Main Page   Packages   Class Hierarchy   Compound List   File List   Compound Members  

characterdatadeletedatagetlengthanddata Class Reference

Inherits DOMTestCase.

List of all members.

Public Methods

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

Static Public Methods

void main (String[] args)


Detailed Description

On successful invocation of the "deleteData(offset,count)" method, the "getData()" and "getLength()" methods reflect the changes.

Retrieve the character data from the last child of the first employee. The "deleteData(offset,count)" method is then called with offset=30 and count=5. The method should delete the characters from position 30 thru position 35. The new value of the character data should be "1230 North Ave. Dallas, Texas" which is returned by the "getData()" method and "getLength()" method should return 30".

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-7D61178C , http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-7C603781

Definition at line 52 of file characterdatadeletedatagetlengthanddata.java.


Constructor & Destructor Documentation

characterdatadeletedatagetlengthanddata::characterdatadeletedatagetlengthanddata DOMTestDocumentBuilderFactory    factory [inline]
 

Definition at line 54 of file characterdatadeletedatagetlengthanddata.java.

00055  {
00056       super(factory);
00057 
00058    }


Member Function Documentation

String characterdatadeletedatagetlengthanddata::getTargetURI   [inline, virtual]
 

Reimplemented from DOMTest.

Definition at line 80 of file characterdatadeletedatagetlengthanddata.java.

00080                                 {
00081       return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/characterdatadeletedatagetlengthanddata";
00082    }

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

Definition at line 83 of file characterdatadeletedatagetlengthanddata.java.

References DOMTestCase::doMain().

00083                                           {
00084         DOMTestCase.doMain(characterdatadeletedatagetlengthanddata.class,args);
00085    }

void characterdatadeletedatagetlengthanddata::runTest   [inline, virtual]
 

Reimplemented from DOMTestCase.

Definition at line 60 of file characterdatadeletedatagetlengthanddata.java.

References DOMTestCase::assertEquals(), and DOMTest::load().

00060                                                     {
00061       Document doc;
00062       NodeList elementList;
00063       Node nameNode;
00064       CharacterData child;
00065       String childData;
00066       int childLength;
00067       List result = new ArrayList();
00068       
00069       doc = load("staff");
00070       elementList = doc.getElementsByTagName("address");
00071       nameNode = elementList.item(0);
00072       child = (CharacterData)nameNode.getFirstChild();
00073       child.deleteData(30,5);
00074       childData = child.getData();
00075       assertEquals("data","1230 North Ave. Dallas, Texas ",childData);
00076       childLength = (int)child.getLength();
00077       assertEquals("length",30,childLength);
00078       
00079    }


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