Main Page Packages Class Hierarchy Compound List File List Compound Members

# elementgetelementempty Class Reference

Inherits DOMTestCase.

List of all members.

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

## Detailed Description

The "getAttribute(name)" method returns an empty string if no value was assigned to an attribute and no default value was given in the DTD file.

Retrieve the last child of the last employee, then invoke "getAttribute(name)" method, where "name" is an attribute without a specified or DTD default value. The "getAttribute(name)" method should return the empty string. This method makes use of the "createAttribute(newAttr)" method from the Document interface.

Author:
  NIST , Mary Brady

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

Definition at line 49 of file elementgetelementempty.java.

## Constructor & Destructor Documentation

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

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

## Member Function Documentation

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

| Reimplemented from DOMTest. Definition at line 73 of file elementgetelementempty.java.
    00073                                 {
    00074       return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/elementgetelementempty";
    00075    }

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

| Definition at line 76 of file elementgetelementempty.java. References DOMTestCase::doMain().
    00076                                           {
    00077         DOMTestCase.doMain(elementgetelementempty.class,args);
    00078    }

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

| Reimplemented from DOMTestCase. Definition at line 57 of file elementgetelementempty.java. References DOMTestCase::assertEquals(), and DOMTest::load().
    00057                                                     {
    00058       Document doc;
    00059       Attr newAttribute;
    00060       NodeList elementList;
    00061       Element testEmployee;
    00062       Attr domesticAttr;
    00063       String attrValue;
    00064       doc = load("staff");
    00065       newAttribute = doc.createAttribute("district");
    00066       elementList = doc.getElementsByTagName("address");
    00067       testEmployee = (Element)elementList.item(3);
    00068       domesticAttr = testEmployee.setAttributeNode(newAttribute);
    00069       attrValue = testEmployee.getAttribute("district");
    00070       assertEquals("elementGetElementEmptyAssert","",attrValue);
    00071
    00072    }

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

- elementgetelementempty.java