Main Page   Packages   Class Hierarchy   Compound List   File List   Compound Members  

characterdataappenddata Class Reference

Inherits DOMTestCase.

List of all members.

Public Methods

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

Static Public Methods

void main (String[] args)


Detailed Description

The "appendData(arg)" method appends a string to the end of the character data of the node.

Retrieve the character data from the second child of the first employee. The appendData(arg) method is called with arg=", Esquire". The method should append the specified data to the already existing character data. The new value return by the "getLength()" method should be 24.

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-32791A2F

Definition at line 48 of file characterdataappenddata.java.


Constructor & Destructor Documentation

characterdataappenddata::characterdataappenddata DOMTestDocumentBuilderFactory    factory [inline]
 

Definition at line 50 of file characterdataappenddata.java.

00051  {
00052       super(factory);
00053 
00054    }


Member Function Documentation

String characterdataappenddata::getTargetURI   [inline, virtual]
 

Reimplemented from DOMTest.

Definition at line 73 of file characterdataappenddata.java.

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

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

Definition at line 76 of file characterdataappenddata.java.

References DOMTestCase::doMain().

00076                                           {
00077         DOMTestCase.doMain(characterdataappenddata.class,args);
00078    }

void characterdataappenddata::runTest   [inline, virtual]
 

Reimplemented from DOMTestCase.

Definition at line 56 of file characterdataappenddata.java.

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

00056                                                     {
00057       Document doc;
00058       NodeList elementList;
00059       Node nameNode;
00060       CharacterData child;
00061       String childValue;
00062       int childLength;
00063       doc = load("staff");
00064       elementList = doc.getElementsByTagName("name");
00065       nameNode = elementList.item(0);
00066       child = (CharacterData)nameNode.getFirstChild();
00067       child.appendData(", Esquire");
00068       childValue = child.getData();
00069       childLength = childValue.length();
00070       assertEquals("characterdataAppendDataAssert",24,childLength);
00071       
00072    }


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