Main Page Packages Class Hierarchy Compound List File List Compound Members

# characterdataindexsizeerrdeletedataoffsetgreater Class Reference

Inherits DOMTestCase.

List of all members.

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

## Detailed Description

The "deleteData(offset,count)" method raises an INDEX_SIZE_ERR DOMException if the specified offset is greater that the number of characters in the string.

Retrieve the character data of the last child of the first employee and invoke its "deleteData(offset,count)" method with offset=40 and count=3. It should raise the desired exception since the offset is greater than the number of characters in the string.

Author:
  NIST , Mary Brady

See also:
  http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-258A00AF')/constant[@name='INDEX_SIZE_ERR']) , http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-7C603781 , http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-7C603781')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='INDEX_SIZE_ERR']) , http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-7C603781

Definition at line 50 of file characterdataindexsizeerrdeletedataoffsetgreater.java.

## Constructor & Destructor Documentation

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

| Definition at line 52 of file characterdataindexsizeerrdeletedataoffsetgreater.java.
    00053  {
    00054       super(factory);
    00055
    00056    }

## Member Function Documentation

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

| Reimplemented from DOMTest. Definition at line 81 of file characterdataindexsizeerrdeletedataoffsetgreater.java.
    00081                                 {
    00082       return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/characterdataindexsizeerrdeletedataoffsetgreater";
    00083    }

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

| Definition at line 84 of file characterdataindexsizeerrdeletedataoffsetgreater.java. References DOMTestCase::doMain().
    00084                                           {
    00085         DOMTestCase.doMain(characterdataindexsizeerrdeletedataoffsetgreater.class,args);
    00086    }

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

| Reimplemented from DOMTestCase. Definition at line 58 of file characterdataindexsizeerrdeletedataoffsetgreater.java. References DOMTestCase::assertTrue(), and DOMTest::load().
    00058                                                     {
    00059       Document doc;
    00060       NodeList elementList;
    00061       Node nameNode;
    00062       CharacterData child;
    00063       doc = load("staff");
    00064       elementList = doc.getElementsByTagName("address");
    00065       nameNode = elementList.item(0);
    00066       child = (CharacterData)nameNode.getFirstChild();
    00067
    00068         {
    00069                 boolean success = false;
    00070                 try {
    00071                         child.deleteData(40,3);
    00072
    00073                 }
    00074                 catch(DOMException ex) {
    00075                         success = (ex.code == DOMException.INDEX_SIZE_ERR);
    00076                 }
    00077                 assertTrue("characterdataIndexSizeErrDeleteDataOffsetGreaterAssert",success);
    00078         }
    00079
    00080    }

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

- characterdataindexsizeerrdeletedataoffsetgreater.java