Main Page Packages Class Hierarchy Compound List File List Compound Members

# elementremoveattributeaftercreate Class Reference

Inherits DOMTestCase.

List of all members.

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

## Detailed Description

The "removeAttributeNode(oldAttr)" method removes the specified attribute.

Retrieve the last child of the third employee, add a new "district" node to it and then try to remove it. To verify that the node was removed use the "getNamedItem(name)" method from the NamedNodeMap interface. It also uses the "getAttributes()" method from the Node interface.

Author:
  NIST , Mary Brady

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

Definition at line 47 of file elementremoveattributeaftercreate.java.

## Constructor & Destructor Documentation

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

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

## Member Function Documentation

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

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

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

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

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

| Reimplemented from DOMTestCase. Definition at line 55 of file elementremoveattributeaftercreate.java. References DOMTestCase::assertNull(), and DOMTest::load().
    00055                                                     {
    00056       Document doc;
    00057       NodeList elementList;
    00058       Element testEmployee;
    00059       Attr newAttribute;
    00060       NamedNodeMap attributes;
    00061       Attr districtAttr;
    00062       doc = load("staff");
    00063       elementList = doc.getElementsByTagName("address");
    00064       testEmployee = (Element)elementList.item(2);
    00065       newAttribute = doc.createAttribute("district");
    00066       districtAttr = testEmployee.setAttributeNode(newAttribute);
    00067       districtAttr = testEmployee.removeAttributeNode(newAttribute);
    00068       attributes = testEmployee.getAttributes();
    00069       districtAttr = (Attr)attributes.getNamedItem("district");
    00070       assertNull("elementRemoveAttributeAfterCreateAssert",districtAttr);
    00071
    00072    }

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

- elementremoveattributeaftercreate.java