Main Page Packages Class Hierarchy Compound List File List Compound Members

# elementgetelementsbytagnamespecialvalue Class Reference

Inherits DOMTestCase.

List of all members.

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

## Detailed Description

The "getElementsByTagName(name)" method may use the special value "*" to match all tags in the element tree.

Create a NodeList of all the descendant elements of the last employee by using the special value "*". The method should return all the descendant children(6) in the order the children were encountered.

Author:
  NIST , Mary Brady

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

Definition at line 46 of file elementgetelementsbytagnamespecialvalue.java.

## Constructor & Destructor Documentation

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

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

## Member Function Documentation

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

| Reimplemented from DOMTest. Definition at line 84 of file elementgetelementsbytagnamespecialvalue.java.
    00084                                 {
    00085       return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/elementgetelementsbytagnamespecialvalue";
    00086    }

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

| Definition at line 87 of file elementgetelementsbytagnamespecialvalue.java. References DOMTestCase::doMain().
    00087                                           {
    00088         DOMTestCase.doMain(elementgetelementsbytagnamespecialvalue.class,args);
    00089    }

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

| Reimplemented from DOMTestCase. Definition at line 54 of file elementgetelementsbytagnamespecialvalue.java. References DOMTestCase::assertEquals(), and DOMTest::load().
    00054                                                     {
    00055       Document doc;
    00056       NodeList elementList;
    00057       Element lastEmployee;
    00058       NodeList lastempList;
    00059       Node child;
    00060       String childName;
    00061       List result = new ArrayList();
    00062
    00063       List expectedResult = new ArrayList();
    00064       expectedResult.add("employeeId");
    00065       expectedResult.add("name");
    00066       expectedResult.add("position");
    00067       expectedResult.add("salary");
    00068       expectedResult.add("gender");
    00069       expectedResult.add("address");
    00070
    00071       doc = load("staff");
    00072       elementList = doc.getElementsByTagName("employee");
    00073       lastEmployee = (Element)elementList.item(4);
    00074       lastempList = lastEmployee.getElementsByTagName("*");
    00075       for(int _index = 0; _index < lastempList.getLength();_index++) {
    00076       child = ( Node ) lastempList.item(_index);
    00077            childName = child.getNodeName();
    00078       result.add(childName);
    00079
    00080         }
    00081       assertEquals("elementGetElementsByTagNameSpecialValueAssert",expectedResult,result);
    00082
    00083    }

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

- elementgetelementsbytagnamespecialvalue.java