Public Methods | |
| nodeelementnodeattributes (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 and invoke the "getAttributes()" method. It should return a NamedNodeMap containing the attributes of the Element node.
Definition at line 46 of file nodeelementnodeattributes.java.
|
|
Definition at line 48 of file nodeelementnodeattributes.java.
00049 {
00050 super(factory);
00051
00052 }
|
|
|
Reimplemented from DOMTest. Definition at line 80 of file nodeelementnodeattributes.java.
00080 {
00081 return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/nodeelementnodeattributes";
00082 }
|
|
|
Definition at line 83 of file nodeelementnodeattributes.java. References DOMTestCase::doMain().
00083 {
00084 DOMTestCase.doMain(nodeelementnodeattributes.class,args);
00085 }
|
|
|
Reimplemented from DOMTestCase. Definition at line 54 of file nodeelementnodeattributes.java. References DOMTestCase::assertEquals(), and DOMTest::load().
00054 {
00055 Document doc;
00056 NodeList elementList;
00057 Element testAddr;
00058 NamedNodeMap addrAttr;
00059 Node attrNode;
00060 String attrName;
00061 Collection attrList = new ArrayList();
00062
00063 Collection expected = new ArrayList();
00064 expected.add("domestic");
00065 expected.add("street");
00066
00067 doc = load("staff");
00068 elementList = doc.getElementsByTagName("address");
00069 testAddr = (Element)elementList.item(2);
00070 addrAttr = testAddr.getAttributes();
00071 for(int _index = 0; _index < addrAttr.getLength();_index++) {
00072 attrNode = ( Node ) addrAttr.item(_index);
00073 attrName = attrNode.getNodeName();
00074 attrList.add(attrName);
00075
00076 }
00077 assertEquals("nodeElementNodeValueAssert1",expected,attrList);
00078
00079 }
|
1.2.13.1 written by Dimitri van Heesch,
© 1997-2001