Main Page Packages Class Hierarchy Compound List File List Compound Members

# characterdataindexsizeerrinsertdataoffsetgreater Class Reference

Inherits DOMTestCase.

List of all members.

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

## Detailed Description

The "insertData(offset,arg)" method raises an INDEX_SIZE_ERR DOMException if the specified offset is greater than the number of characters in the string.

Retrieve the character data of the last child of the first employee and invoke its insertData"(offset,arg)" method with offset=40 and arg="ABC". 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'])

Definition at line 49 of file characterdataindexsizeerrinsertdataoffsetgreater.java.

## Constructor & Destructor Documentation

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

| Definition at line 51 of file characterdataindexsizeerrinsertdataoffsetgreater.java.
    00052  {
    00053       super(factory);
    00054
    00055    }

## Member Function Documentation

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

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

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

| Definition at line 83 of file characterdataindexsizeerrinsertdataoffsetgreater.java. References DOMTestCase::doMain().
    00083                                           {
    00084         DOMTestCase.doMain(characterdataindexsizeerrinsertdataoffsetgreater.class,args);
    00085    }

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

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

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

- characterdataindexsizeerrinsertdataoffsetgreater.java