Main Page Packages Class Hierarchy Compound List File List Compound Members

# namednodemapreturnattrnode Class Reference

Inherits DOMTestCase.

List of all members.

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

## Detailed Description

The "getNamedItem(name)" method returns a node of any type specified by name.

Retrieve the second employee and create a NamedNodeMap listing of the attributes of the last child. Once the list is created an invocation of the "getNamedItem(name)" method is done with name="street". This should result in the method returning an Attr node.

Author:
  NIST , Mary Brady

See also:
  http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-1074577549 , http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-84CF096 , http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-637646024 , http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-1112119403

Definition at line 49 of file namednodemapreturnattrnode.java.

## Constructor & Destructor Documentation

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

| Definition at line 51 of file namednodemapreturnattrnode.java.
    00052  {
    00053       super(factory);
    00054
    00055    }

## Member Function Documentation

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

| Reimplemented from DOMTest. Definition at line 76 of file namednodemapreturnattrnode.java.
    00076                                 {
    00077       return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/namednodemapreturnattrnode";
    00078    }

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

| Definition at line 79 of file namednodemapreturnattrnode.java. References DOMTestCase::doMain().
    00079                                           {
    00080         DOMTestCase.doMain(namednodemapreturnattrnode.class,args);
    00081    }

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

| Reimplemented from DOMTestCase. Definition at line 57 of file namednodemapreturnattrnode.java. References DOMTestCase::assertEquals(), DOMTestCase::assertInstanceOf(), and DOMTest::load().
    00057                                                     {
    00058       Document doc;
    00059       NodeList elementList;
    00060       Node testEmployee;
    00061       NamedNodeMap attributes;
    00062       Node streetAttr;
    00063       String attrName;
    00064       doc = load("staff");
    00065       elementList = doc.getElementsByTagName("address");
    00066       testEmployee = elementList.item(1);
    00067       attributes = testEmployee.getAttributes();
    00068       streetAttr = attributes.getNamedItem("street");
    00069       assertInstanceOf("typeAssert",Attr.class,streetAttr);
    00070 attrName = streetAttr.getNodeName();
    00071       assertEquals("nodeName","street",attrName);
    00072       attrName = ((Attr)/*Node*/streetAttr).getName();
    00073       assertEquals("attrName","street",attrName);
    00074
    00075    }

The documentation for this class was generated from the following file:

- namednodemapreturnattrnode.java