Main Page Packages Class Hierarchy Compound List File List Compound Members

# nodesetnodevaluenomodificationallowederr Class Reference

Inherits DOMTestCase.

List of all members.

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

## Detailed Description

The "setNodeValue(nodeValue)" method causes the DOMException NO_MODIFICATION_ALLOWED_ERR to be raised if the node is readonly.

Obtain the children of the THIRD "gender" element. The elements content is an entity reference. Get the SECOND item from the entity reference and execute the "setNodeValue(nodeValue)" method. This causes a NO_MODIFICATION_ALLOWED_ERR DOMException to be thrown.

Author:
  NIST , Mary Brady , 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-F68D080 , http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-F68D080')/setraises/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-F68D080

Definition at line 50 of file nodesetnodevaluenomodificationallowederr.java.

## Constructor & Destructor Documentation

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

| Definition at line 52 of file nodesetnodevaluenomodificationallowederr.java. References DocumentBuilderSetting::notExpandEntityReferences, and DOMTest::setFactory().
    00053                                      {
    00054
    00055       DocumentBuilderSetting[] settings = new DocumentBuilderSetting[] {
    00056 DocumentBuilderSetting.notExpandEntityReferences
    00057         };
    00058         DOMTestDocumentBuilderFactory testFactory = factory.newInstance(settings);
    00059         setFactory(testFactory);
    00060
    00061    }

## Member Function Documentation

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

| Reimplemented from DOMTest. Definition at line 90 of file nodesetnodevaluenomodificationallowederr.java.
    00090                                 {
    00091       return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/nodesetnodevaluenomodificationallowederr";
    00092    }

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

| Definition at line 93 of file nodesetnodevaluenomodificationallowederr.java. References DOMTestCase::doMain().
    00093                                           {
    00094         DOMTestCase.doMain(nodesetnodevaluenomodificationallowederr.class,args);
    00095    }

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

| Reimplemented from DOMTestCase. Definition at line 63 of file nodesetnodevaluenomodificationallowederr.java. References DOMTestCase::assertTrue(), and DOMTest::load().
    00063                                                     {
    00064       Document doc;
    00065       NodeList genderList;
    00066       Node genderNode;
    00067       EntityReference entRef;
    00068       Element entElement;
    00069       CharacterData entElementText;
    00070       doc = load("staff");
    00071       genderList = doc.getElementsByTagName("gender");
    00072       genderNode = genderList.item(2);
    00073       entRef = (EntityReference)genderNode.getFirstChild();
    00074       entElement = (Element)entRef.getFirstChild();
    00075       entElementText = (CharacterData)entElement.getFirstChild();
    00076
    00077         {
    00078                 boolean success = false;
    00079                 try {
    00080                         entElementText.setNodeValue("newValue");
    00081
    00082                 }
    00083                 catch(DOMException ex) {
    00084                         success = (ex.code == DOMException.NO_MODIFICATION_ALLOWED_ERR);
    00085                 }
    00086                 assertTrue("throw_NO_MODIFICATION_ALLOWED_ERR",success);
    00087         }
    00088
    00089    }

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

- nodesetnodevaluenomodificationallowederr.java