Public Methods | |
| elementremoveattributeaftercreate (DOMTestDocumentBuilderFactory factory) | |
| void | runTest () throws java.lang.Throwable |
| String | getTargetURI () |
Static Public Methods | |
| void | main (String[] args) |
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.
Definition at line 47 of file elementremoveattributeaftercreate.java.
|
|
Definition at line 49 of file elementremoveattributeaftercreate.java.
00050 {
00051 super(factory);
00052
00053 }
|
|
|
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 }
|
|
|
Definition at line 76 of file elementremoveattributeaftercreate.java. References DOMTestCase::doMain().
00076 {
00077 DOMTestCase.doMain(elementremoveattributeaftercreate.class,args);
00078 }
|
|
|
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 }
|
1.2.13.1 written by Dimitri van Heesch,
© 1997-2001