Main Page Packages Class Hierarchy Compound List File List Compound Members

# characterdatasubstringexceedsvalue Class Reference

Inherits DOMTestCase.

List of all members.

## Public Methods
| characterdatasubstringexceedsvalue (DOMTestDocumentBuilderFactory factory)
void | runTest () throws java.lang.Throwable
String | getTargetURI ()
## Static Public Methods
void | main (String[] args)

## Detailed Description

If the sum of the "offset" and "count" exceeds the "length" then the "substringData(offset,count)" method returns all the characters to the end of the data.

Retrieve the character data from the second child of the first employee and access part of the data by using the substringData(offset,count) method with offset=9 and count=10. The method should return the substring "Martin" since offset+count > length (19 > 15).

Author:
  NIST , Mary Brady

See also:
  http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-6531BCCF

Definition at line 48 of file characterdatasubstringexceedsvalue.java.

## Constructor & Destructor Documentation

characterdatasubstringexceedsvalue::characterdatasubstringexceedsvalue | ( | DOMTestDocumentBuilderFactory | factory | ) | `[inline]`

| Definition at line 50 of file characterdatasubstringexceedsvalue.java.
    00051  {
    00052       super(factory);
    00053
    00054    }

## Member Function Documentation

String characterdatasubstringexceedsvalue::getTargetURI | ( |  | ) | `[inline, virtual]`

| Reimplemented from DOMTest. Definition at line 70 of file characterdatasubstringexceedsvalue.java.
    00070                                 {
    00071       return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/characterdatasubstringexceedsvalue";
    00072    }

void characterdatasubstringexceedsvalue::main | ( | String | args[] | ) | `[inline, static]`

| Definition at line 73 of file characterdatasubstringexceedsvalue.java. References DOMTestCase::doMain().
    00073                                           {
    00074         DOMTestCase.doMain(characterdatasubstringexceedsvalue.class,args);
    00075    }

void characterdatasubstringexceedsvalue::runTest | ( |  | ) | `[inline, virtual]`

| Reimplemented from DOMTestCase. Definition at line 56 of file characterdatasubstringexceedsvalue.java. References DOMTestCase::assertEquals(), and DOMTest::load().
    00056                                                     {
    00057       Document doc;
    00058       NodeList elementList;
    00059       Node nameNode;
    00060       CharacterData child;
    00061       String substring;
    00062       doc = load("staff");
    00063       elementList = doc.getElementsByTagName("name");
    00064       nameNode = elementList.item(0);
    00065       child = (CharacterData)nameNode.getFirstChild();
    00066       substring = child.substringData(9,10);
    00067       assertEquals("characterdataSubStringExceedsValueAssert","Martin",substring);
    00068
    00069    }

The documentation for this class was generated from the following file:

- characterdatasubstringexceedsvalue.java