Main Page Packages Class Hierarchy Compound List File List Compound Members

# attrcreatetextnode Class Reference

Inherits DOMTestCase.

List of all members.

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

## Detailed Description

The "setValue()" 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-221662474

Definition at line 46 of file attrcreatetextnode.java.

## Constructor & Destructor Documentation

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

| Definition at line 48 of file attrcreatetextnode.java.
    00049  {
    00050       super(factory);
    00051
    00052    }

## Member Function Documentation

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

| Reimplemented from DOMTest. Definition at line 73 of file attrcreatetextnode.java.
    00073                                 {
    00074       return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/attrcreatetextnode";
    00075    }

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

| Definition at line 76 of file attrcreatetextnode.java. References DOMTestCase::doMain().
    00076                                           {
    00077         DOMTestCase.doMain(attrcreatetextnode.class,args);
    00078    }

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

| Reimplemented from DOMTestCase. Definition at line 54 of file attrcreatetextnode.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.setValue("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:

- attrcreatetextnode.java