Main Page Packages Class Hierarchy Compound List File List Compound Members

# elementretrievetagname Class Reference

Inherits DOMTestCase.

List of all members.

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

## Detailed Description

The "getElementsByTagName()" method returns a NodeList of all descendant elements with a given tagName.

Invoke the "getElementsByTagName()" method and create a NodeList of "position" elements. Retrieve the second "position" element in the list and return the NodeName.

Author:
  NIST , Mary Brady

See also:
  http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-F68D095 , http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core#ID-104682815

Definition at line 45 of file elementretrievetagname.java.

## Constructor & Destructor Documentation

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

| Definition at line 47 of file elementretrievetagname.java.
    00048  {
    00049       super(factory);
    00050
    00051    }

## Member Function Documentation

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

| Reimplemented from DOMTest. Definition at line 67 of file elementretrievetagname.java.
    00067                                 {
    00068       return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/elementretrievetagname";
    00069    }

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

| Definition at line 70 of file elementretrievetagname.java. References DOMTestCase::doMain().
    00070                                           {
    00071         DOMTestCase.doMain(elementretrievetagname.class,args);
    00072    }

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

| Reimplemented from DOMTestCase. Definition at line 53 of file elementretrievetagname.java. References DOMTestCase::assertEquals(), and DOMTest::load().
    00053                                                     {
    00054       Document doc;
    00055       NodeList elementList;
    00056       Node testEmployee;
    00057       String name;
    00058       doc = load("staff");
    00059       elementList = doc.getElementsByTagName("position");
    00060       testEmployee = elementList.item(1);
    00061       name = testEmployee.getNodeName();
    00062       assertEquals("nodename","position",name);
    00063       name = ((Element)/*Node*/testEmployee).getTagName();
    00064       assertEquals("tagname","position",name);
    00065
    00066    }

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

- elementretrievetagname.java