Main Page   Packages   Class Hierarchy   Compound List   File List   Compound Members  

namednodemapremovenameditemgetvalue Class Reference

Inherits DOMTestCase.

List of all members.

Public Methods

 namednodemapremovenameditemgetvalue (DOMTestDocumentBuilderFactory factory)
void runTest () throws java.lang.Throwable
String getTargetURI ()

Static Public Methods

void main (String[] args)


Detailed Description

If the node removed by the "removeNamedItem(name)" method is an Attr node with a default value it is immediately replaced.

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". The "removeNamedItem(name)" method should remove the "street" attribute and since it has a default value of "Yes", that value should immediately be the attributes value.

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 50 of file namednodemapremovenameditemgetvalue.java.


Constructor & Destructor Documentation

namednodemapremovenameditemgetvalue::namednodemapremovenameditemgetvalue DOMTestDocumentBuilderFactory    factory [inline]
 

Definition at line 52 of file namednodemapremovenameditemgetvalue.java.

00053  {
00054       super(factory);
00055 
00056    }


Member Function Documentation

String namednodemapremovenameditemgetvalue::getTargetURI   [inline, virtual]
 

Reimplemented from DOMTest.

Definition at line 76 of file namednodemapremovenameditemgetvalue.java.

00076                                 {
00077       return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/namednodemapremovenameditemgetvalue";
00078    }

void namednodemapremovenameditemgetvalue::main String    args[] [inline, static]
 

Definition at line 79 of file namednodemapremovenameditemgetvalue.java.

References DOMTestCase::doMain().

00079                                           {
00080         DOMTestCase.doMain(namednodemapremovenameditemgetvalue.class,args);
00081    }

void namednodemapremovenameditemgetvalue::runTest   [inline, virtual]
 

Reimplemented from DOMTestCase.

Definition at line 58 of file namednodemapremovenameditemgetvalue.java.

References DOMTestCase::assertEquals(), and DOMTest::load().

00058                                                     {
00059       Document doc;
00060       NodeList elementList;
00061       Node testEmployee;
00062       NamedNodeMap attributes;
00063       Attr streetAttr;
00064       String value;
00065       Node removedNode;
00066       doc = load("staff");
00067       elementList = doc.getElementsByTagName("address");
00068       testEmployee = elementList.item(2);
00069       attributes = testEmployee.getAttributes();
00070       removedNode = attributes.removeNamedItem("street");
00071       streetAttr = (Attr)attributes.getNamedItem("street");
00072       value = streetAttr.getValue();
00073       assertEquals("namednodemapRemoveNamedItemGetValueAssert","Yes",value);
00074       
00075    }


The documentation for this class was generated from the following file:
Generated on Thu Feb 14 19:46:54 2002 for DOM Level 1 Core Test Suite by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001