Main Page   Packages   Class Hierarchy   Compound List   File List   Compound Members  

elementchangeattributevalue Class Reference

Inherits DOMTestCase.

List of all members.

Public Methods

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

Static Public Methods

void main (String[] args)


Detailed Description

The "setAttribute(name,value)" method adds a new attribute to the Element. If the "name" is already present, then its value should be changed to the new one that is in the "value" parameter.

Retrieve the last child of the fourth employee, then add an attribute to it by invoking the "setAttribute(name,value)" method. Since the name of the used attribute("street") is already present in this element, then its value should be changed to the new one of the "value" parameter.

Author:
NIST , Mary Brady
See also:
http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-F68F082

Definition at line 49 of file elementchangeattributevalue.java.


Constructor & Destructor Documentation

elementchangeattributevalue::elementchangeattributevalue DOMTestDocumentBuilderFactory    factory [inline]
 

Definition at line 51 of file elementchangeattributevalue.java.

00052  {
00053       super(factory);
00054 
00055    }


Member Function Documentation

String elementchangeattributevalue::getTargetURI   [inline, virtual]
 

Reimplemented from DOMTest.

Definition at line 70 of file elementchangeattributevalue.java.

00070                                 {
00071       return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/elementchangeattributevalue";
00072    }

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

Definition at line 73 of file elementchangeattributevalue.java.

References DOMTestCase::doMain().

00073                                           {
00074         DOMTestCase.doMain(elementchangeattributevalue.class,args);
00075    }

void elementchangeattributevalue::runTest   [inline, virtual]
 

Reimplemented from DOMTestCase.

Definition at line 57 of file elementchangeattributevalue.java.

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

00057                                                     {
00058       Document doc;
00059       NodeList elementList;
00060       Element testEmployee;
00061       String attrValue;
00062       doc = load("staff");
00063       elementList = doc.getElementsByTagName("address");
00064       testEmployee = (Element)elementList.item(3);
00065       testEmployee.setAttribute("street","Neither");
00066       attrValue = testEmployee.getAttribute("street");
00067       assertEquals("elementChangeAttributeValueAssert","Neither",attrValue);
00068       
00069    }


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