Main Page   Packages   Class Hierarchy   Compound List   File List   Compound Members  

attrcreatetextnode2 Class Reference

Inherits DOMTestCase.

List of all members.

Public Methods

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

Static Public Methods

void main (String[] args)


Detailed Description

The "setNodeValue()" method for an attribute creates a Text node with the unparsed content of the string. Retrieve the attribute named "street" from the last child of of the fourth employee and assign the "Yent1;" string to its value attribute. This value is not yet parsed and therefore should still be the same upon retrieval. This test uses the "getNamedItem(name)" method from the NamedNodeMap interface.

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

Definition at line 46 of file attrcreatetextnode2.java.


Constructor & Destructor Documentation

attrcreatetextnode2::attrcreatetextnode2 DOMTestDocumentBuilderFactory    factory [inline]
 

Definition at line 48 of file attrcreatetextnode2.java.

00049  {
00050       super(factory);
00051 
00052    }


Member Function Documentation

String attrcreatetextnode2::getTargetURI   [inline, virtual]
 

Reimplemented from DOMTest.

Definition at line 73 of file attrcreatetextnode2.java.

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

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

Definition at line 76 of file attrcreatetextnode2.java.

References DOMTestCase::doMain().

00076                                           {
00077         DOMTestCase.doMain(attrcreatetextnode2.class,args);
00078    }

void attrcreatetextnode2::runTest   [inline, virtual]
 

Reimplemented from DOMTestCase.

Definition at line 54 of file attrcreatetextnode2.java.

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

00054                                                     {
00055       Document doc;
00056       NodeList addressList;
00057       Node testNode;
00058       NamedNodeMap attributes;
00059       Attr streetAttr;
00060       String value;
00061       doc = load("staff");
00062       addressList = doc.getElementsByTagName("address");
00063       testNode = addressList.item(3);
00064       attributes = testNode.getAttributes();
00065       streetAttr = (Attr)attributes.getNamedItem("street");
00066       streetAttr.setNodeValue("Y%ent1");
00067       value = streetAttr.getValue();
00068       assertEquals("value","Y%ent1",value);
00069       value = streetAttr.getNodeValue();
00070       assertEquals("nodeValue","Y%ent1",value);
00071       
00072    }


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