Main Page Packages Class Hierarchy Compound List File List Compound Members

# namednodemapremovenameditem Class Reference

Inherits DOMTestCase.

List of all members.

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

## Detailed Description

The "removeNamedItem(name)" method removes a node specified by name.

Retrieve the third employee and create a NamedNodeMap object of the attributes of the last child. Once the list is created invoke the "removeNamedItem(name)" method with name="street". This should result in the removal of the specified attribute and the "getSpecified()" method should return false.

Author:
  NIST , Mary Brady

See also:
  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#ID-349467F9

Definition at line 48 of file namednodemapremovenameditem.java.

## Constructor & Destructor Documentation

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

| Definition at line 50 of file namednodemapremovenameditem.java.
    00051  {
    00052       super(factory);
    00053
    00054    }

## Member Function Documentation

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

| Reimplemented from DOMTest. Definition at line 75 of file namednodemapremovenameditem.java.
    00075                                 {
    00076       return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/namednodemapremovenameditem";
    00077    }

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

| Definition at line 78 of file namednodemapremovenameditem.java. References DOMTestCase::doMain().
    00078                                           {
    00079         DOMTestCase.doMain(namednodemapremovenameditem.class,args);
    00080    }

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

| Reimplemented from DOMTestCase. Definition at line 56 of file namednodemapremovenameditem.java. References DOMTestCase::assertFalse(), and DOMTest::load().
    00056                                                     {
    00057       Document doc;
    00058       NodeList elementList;
    00059       Attr newAttribute;
    00060       Node testAddress;
    00061       NamedNodeMap attributes;
    00062       Attr streetAttr;
    00063       boolean specified;
    00064       Node removedNode;
    00065       doc = load("staff");
    00066       elementList = doc.getElementsByTagName("address");
    00067       testAddress = elementList.item(2);
    00068       attributes = testAddress.getAttributes();
    00069       removedNode = attributes.removeNamedItem("street");
    00070       streetAttr = (Attr)attributes.getNamedItem("street");
    00071       specified = streetAttr.getSpecified();
    00072       assertFalse("namednodemapRemoveNamedItemAssert",specified);
    00073
    00074    }

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

- namednodemapremovenameditem.java