Main Page   Packages   Class Hierarchy   Compound List   File List   Compound Members  

characterdatagetlength Class Reference

Inherits DOMTestCase.

List of all members.

Public Methods

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

Static Public Methods

void main (String[] args)


Detailed Description

The "getLength()" method returns the number of characters stored in this nodes data. Retrieve the character data from the second child of the first employee and examine the value returned by the getLength() method.

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

Definition at line 44 of file characterdatagetlength.java.


Constructor & Destructor Documentation

characterdatagetlength::characterdatagetlength DOMTestDocumentBuilderFactory    factory [inline]
 

Definition at line 46 of file characterdatagetlength.java.

00047  {
00048       super(factory);
00049 
00050    }


Member Function Documentation

String characterdatagetlength::getTargetURI   [inline, virtual]
 

Reimplemented from DOMTest.

Definition at line 68 of file characterdatagetlength.java.

00068                                 {
00069       return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/characterdatagetlength";
00070    }

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

Definition at line 71 of file characterdatagetlength.java.

References DOMTestCase::doMain().

00071                                           {
00072         DOMTestCase.doMain(characterdatagetlength.class,args);
00073    }

void characterdatagetlength::runTest   [inline, virtual]
 

Reimplemented from DOMTestCase.

Definition at line 52 of file characterdatagetlength.java.

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

00052                                                     {
00053       Document doc;
00054       NodeList elementList;
00055       Node nameNode;
00056       CharacterData child;
00057       String childValue;
00058       int childLength;
00059       doc = load("staff");
00060       elementList = doc.getElementsByTagName("name");
00061       nameNode = elementList.item(0);
00062       child = (CharacterData)nameNode.getFirstChild();
00063       childValue = child.getData();
00064       childLength = childValue.length();
00065       assertEquals("characterdataGetLengthAssert",15,childLength);
00066       
00067    }


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