Main Page Packages Class Hierarchy Compound List File List Compound Members

# nodelistindexgetlength Class Reference

Inherits DOMTestCase.

List of all members.

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

## Detailed Description

The "getLength()" method returns the number of nodes in the list.

Create a list of all the children elements of the third employee and invoke the "getLength()" method. It should contain the value 13.

Author:
  NIST , Mary Brady

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

Definition at line 44 of file nodelistindexgetlength.java.

## Constructor & Destructor Documentation

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

| Definition at line 46 of file nodelistindexgetlength.java.
    00047  {
    00048       super(factory);
    00049
    00050    }

## Member Function Documentation

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

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

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

| Definition at line 78 of file nodelistindexgetlength.java. References DOMTestCase::doMain().
    00078                                           {
    00079         DOMTestCase.doMain(nodelistindexgetlength.class,args);
    00080    }

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

| Reimplemented from DOMTestCase. Definition at line 52 of file nodelistindexgetlength.java. References DOMTestCase::assertSize(), DOMTest::isIgnoringElementContentWhitespace(), and DOMTest::load().
    00052                                                     {
    00053       Document doc;
    00054       NodeList elementList;
    00055       Node employeeNode;
    00056       NodeList employeeList;
    00057       doc = load("staff");
    00058       elementList = doc.getElementsByTagName("employee");
    00059       employeeNode = elementList.item(2);
    00060       employeeList = employeeNode.getChildNodes();
    00061
    00062         if(
    00063         isIgnoringElementContentWhitespace()
    00064         ) {
    00065         assertSize("lengthNoWhitespace",6,employeeList);
    00066
    00067         }
    00068
    00069                 else {
    00070                         assertSize("lengthWhitespace",13,employeeList);
    00071
    00072                 }
    00073
    00074    }

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

- nodelistindexgetlength.java