Main Page Packages Class Hierarchy Compound List File List Compound Members

# documentgetelementsbytagnamevalue Class Reference

Inherits DOMTestCase.

List of all members.

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

## Detailed Description

The "getElementsByTagName(tagName)" method returns a NodeList of all the Elements with a given tagName in a pre-order traversal of the tree.

Retrieve the entire DOM document and invoke its "getElementsByTagName(tagName)" method with tagName equal to "name". The method should return a NodeList that contains 5 elements. The FOURTH item in the list is retrieved and output.

Author:
  NIST , Mary Brady

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

Definition at line 47 of file documentgetelementsbytagnamevalue.java.

## Constructor & Destructor Documentation

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

| Definition at line 49 of file documentgetelementsbytagnamevalue.java.
    00050  {
    00051       super(factory);
    00052
    00053    }

## Member Function Documentation

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

| Reimplemented from DOMTest. Definition at line 69 of file documentgetelementsbytagnamevalue.java.
    00069                                 {
    00070       return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/documentgetelementsbytagnamevalue";
    00071    }

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

| Definition at line 72 of file documentgetelementsbytagnamevalue.java. References DOMTestCase::doMain().
    00072                                           {
    00073         DOMTestCase.doMain(documentgetelementsbytagnamevalue.class,args);
    00074    }

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

| Reimplemented from DOMTestCase. Definition at line 55 of file documentgetelementsbytagnamevalue.java. References DOMTestCase::assertEquals(), and DOMTest::load().
    00055                                                     {
    00056       Document doc;
    00057       NodeList nameList;
    00058       Node nameNode;
    00059       Node firstChild;
    00060       String childValue;
    00061       doc = load("staff");
    00062       nameList = doc.getElementsByTagName("name");
    00063       nameNode = nameList.item(3);
    00064       firstChild = nameNode.getFirstChild();
    00065       childValue = firstChild.getNodeValue();
    00066       assertEquals("documentGetElementsByTagNameValueAssert","Jeny Oconnor",childValue);
    00067
    00068    }

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

- documentgetelementsbytagnamevalue.java