Main Page Packages Class Hierarchy Compound List File List Compound Members

# characterdatadeletedatanomodificationallowederrEE Class Reference

Inherits DOMTestCase.

List of all members.

## Public Methods
| characterdatadeletedatanomodificationallowederrEE (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 a NO_MODIFICATION_ALLOWED_ERR DOMException if the node is readonly. Obtain the children of the THIRD "gender" element. Add an reference to ent4. Get the FIRST item from the entity reference and execute the "deleteData(offset,count)" method. This causes a NO_MODIFICATION_ALLOWED_ERR DOMException to be thrown.

Author:
  Curt Arnold

See also:
  http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-258A00AF')/constant[@name='NO_MODIFICATION_ALLOWED_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(.,':')='NO_MODIFICATION_ALLOWED_ERR']) , http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-7C603781 , http://www.w3.org/2001/DOM-Test-Suite/level1/core/characterdatadeletedatanomodificationallowederr.xml

Definition at line 47 of file characterdatadeletedatanomodificationallowederrEE.java.

## Constructor & Destructor Documentation

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

| Definition at line 49 of file characterdatadeletedatanomodificationallowederrEE.java.
    00050  {
    00051       super(factory);
    00052
    00053    }

## Member Function Documentation

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

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

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

| Definition at line 85 of file characterdatadeletedatanomodificationallowederrEE.java. References DOMTestCase::doMain().
    00085                                           {
    00086         DOMTestCase.doMain(characterdatadeletedatanomodificationallowederrEE.class,args);
    00087    }

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

| Reimplemented from DOMTestCase. Definition at line 55 of file characterdatadeletedatanomodificationallowederrEE.java. References DOMTestCase::assertTrue(), and DOMTest::load().
    00055                                                     {
    00056       Document doc;
    00057       NodeList genderList;
    00058       Node genderNode;
    00059       Node entText;
    00060       EntityReference entReference;
    00061       Node appendedChild;
    00062       doc = load("staff");
    00063       genderList = doc.getElementsByTagName("gender");
    00064       genderNode = genderList.item(2);
    00065       entReference = doc.createEntityReference("ent3");
    00066       appendedChild = genderNode.appendChild(entReference);
    00067       entText = entReference.getFirstChild();
    00068
    00069         {
    00070                 boolean success = false;
    00071                 try {
    00072                         ((CharacterData)/*Node*/entText).deleteData(1,3);
    00073
    00074                 }
    00075                 catch(DOMException ex) {
    00076                         success = (ex.code == DOMException.NO_MODIFICATION_ALLOWED_ERR);
    00077                 }
    00078                 assertTrue("throw_NO_MODIFICATION_ALLOWED_ERR",success);
    00079         }
    00080
    00081    }

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

- characterdatadeletedatanomodificationallowederrEE.java