Main Page   Packages   Class Hierarchy   Compound List   File List   Compound Members  

elementreplaceexistingattributegevalue Class Reference

Inherits DOMTestCase.

List of all members.

Public Methods

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

Static Public Methods

void main (String[] args)


Detailed Description

If the "setAttributeNode(newAttr)" method replaces an existing Attr node with the same name, then it should return the previously existing Attr node.

Retrieve the last child of the third employee and add a new attribute node. The new attribute node is "street", which is already present in this Element. The method should return the existing Attr node(old "street" Attr). This test uses the "createAttribute(name)" method from the Document interface.

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

Definition at line 48 of file elementreplaceexistingattributegevalue.java.


Constructor & Destructor Documentation

elementreplaceexistingattributegevalue::elementreplaceexistingattributegevalue DOMTestDocumentBuilderFactory    factory [inline]
 

Definition at line 50 of file elementreplaceexistingattributegevalue.java.

00051  {
00052       super(factory);
00053 
00054    }


Member Function Documentation

String elementreplaceexistingattributegevalue::getTargetURI   [inline, virtual]
 

Reimplemented from DOMTest.

Definition at line 72 of file elementreplaceexistingattributegevalue.java.

00072                                 {
00073       return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/elementreplaceexistingattributegevalue";
00074    }

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

Definition at line 75 of file elementreplaceexistingattributegevalue.java.

References DOMTestCase::doMain().

00075                                           {
00076         DOMTestCase.doMain(elementreplaceexistingattributegevalue.class,args);
00077    }

void elementreplaceexistingattributegevalue::runTest   [inline, virtual]
 

Reimplemented from DOMTestCase.

Definition at line 56 of file elementreplaceexistingattributegevalue.java.

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

00056                                                     {
00057       Document doc;
00058       NodeList elementList;
00059       Element testEmployee;
00060       Attr newAttribute;
00061       Attr streetAttr;
00062       String value;
00063       doc = load("staff");
00064       elementList = doc.getElementsByTagName("address");
00065       testEmployee = (Element)elementList.item(2);
00066       newAttribute = doc.createAttribute("street");
00067       streetAttr = testEmployee.setAttributeNode(newAttribute);
00068       value = streetAttr.getValue();
00069       assertEquals("elementReplaceExistingAttributeGeValueAssert","No",value);
00070       
00071    }


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