Main Page Packages Class Hierarchy Compound List File List Compound Members

# namednodemapnotfounderr Class Reference

Inherits DOMTestCase.

List of all members.

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

## Detailed Description

The "removeNamedItem(name)" method raises a NOT_FOUND_ERR DOMException if there is not a node named "name" in the map.

Create a NamedNodeMap object from the attributes of the last child of the third employee and attempt to remove the "district" attribute. There is not a node named "district" in the list and therefore the desired exception should be raised.

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='INUSE_ATTRIBUTE_ERR']) , http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-D58B193 , http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#xpointer(id('ID-D58B193')/raises/exception[@name='DOMException']/descr/p[substring-before(.,':')='INUSE_ATTRIBUTE_ERR'])

Definition at line 49 of file namednodemapnotfounderr.java.

## Constructor & Destructor Documentation

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

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

## Member Function Documentation

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

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

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

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

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

| Reimplemented from DOMTestCase. Definition at line 57 of file namednodemapnotfounderr.java. References DOMTestCase::assertTrue(), and DOMTest::load().
    00057                                                     {
    00058       Document doc;
    00059       NodeList elementList;
    00060       Element testEmployee;
    00061       NamedNodeMap attributes;
    00062       Node removedNode;
    00063       doc = load("staff");
    00064       elementList = doc.getElementsByTagName("address");
    00065       testEmployee = (Element)elementList.item(2);
    00066       attributes = testEmployee.getAttributes();
    00067
    00068         {
    00069                 boolean success = false;
    00070                 try {
    00071                         removedNode = attributes.removeNamedItem("district");
    00072
    00073                 }
    00074                 catch(DOMException ex) {
    00075                         success = (ex.code == DOMException.NOT_FOUND_ERR);
    00076                 }
    00077                 assertTrue("throw_NOT_FOUND_ERR",success);
    00078         }
    00079
    00080    }

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

- namednodemapnotfounderr.java