Main Page Packages Class Hierarchy Compound List File List Compound Members

# elementremoveattribute Class Reference

Inherits DOMTestCase.

List of all members.

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

## Detailed Description

The "removeAttribute(name)" removes an attribute by name. If the attribute has a default value, it is immediately replaced.

Retrieve the attribute named "street" from the last child of the fourth employee, then remove the "street" attribute by invoking the "removeAttribute(name)" method. The "street" attribute has a default value defined in the DTD file, that value should immediately replace the old value.

Author:
  NIST , Mary Brady

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

Definition at line 48 of file elementremoveattribute.java.

## Constructor & Destructor Documentation

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

| Definition at line 50 of file elementremoveattribute.java.
    00051  {
    00052       super(factory);
    00053
    00054    }

## Member Function Documentation

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

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

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

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

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

| Reimplemented from DOMTestCase. Definition at line 56 of file elementremoveattribute.java. References DOMTestCase::assertEquals(), and DOMTest::load().
    00056                                                     {
    00057       Document doc;
    00058       NodeList elementList;
    00059       Element testEmployee;
    00060       String attrValue;
    00061       doc = load("staff");
    00062       elementList = doc.getElementsByTagName("address");
    00063       testEmployee = (Element)elementList.item(3);
    00064       testEmployee.removeAttribute("street");
    00065       attrValue = testEmployee.getAttribute("street");
    00066       assertEquals("elementRemoveAttributeAssert","Yes",attrValue);
    00067
    00068    }

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

- elementremoveattribute.java