Public Methods | |
| namednodemapreturnattrnode (DOMTestDocumentBuilderFactory factory) | |
| void | runTest () throws java.lang.Throwable |
| String | getTargetURI () |
Static Public Methods | |
| void | main (String[] args) |
Retrieve the second employee and create a NamedNodeMap listing of the attributes of the last child. Once the list is created an invocation of the "getNamedItem(name)" method is done with name="street". This should result in the method returning an Attr node.
Definition at line 49 of file namednodemapreturnattrnode.java.
|
|
Definition at line 51 of file namednodemapreturnattrnode.java.
00052 {
00053 super(factory);
00054
00055 }
|
|
|
Reimplemented from DOMTest. Definition at line 76 of file namednodemapreturnattrnode.java.
00076 {
00077 return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/namednodemapreturnattrnode";
00078 }
|
|
|
Definition at line 79 of file namednodemapreturnattrnode.java. References DOMTestCase::doMain().
00079 {
00080 DOMTestCase.doMain(namednodemapreturnattrnode.class,args);
00081 }
|
|
|
Reimplemented from DOMTestCase. Definition at line 57 of file namednodemapreturnattrnode.java. References DOMTestCase::assertEquals(), DOMTestCase::assertInstanceOf(), and DOMTest::load().
00057 {
00058 Document doc;
00059 NodeList elementList;
00060 Node testEmployee;
00061 NamedNodeMap attributes;
00062 Node streetAttr;
00063 String attrName;
00064 doc = load("staff");
00065 elementList = doc.getElementsByTagName("address");
00066 testEmployee = elementList.item(1);
00067 attributes = testEmployee.getAttributes();
00068 streetAttr = attributes.getNamedItem("street");
00069 assertInstanceOf("typeAssert",Attr.class,streetAttr);
00070 attrName = streetAttr.getNodeName();
00071 assertEquals("nodeName","street",attrName);
00072 attrName = ((Attr)/*Node*/streetAttr).getName();
00073 assertEquals("attrName","street",attrName);
00074
00075 }
|
1.2.13.1 written by Dimitri van Heesch,
© 1997-2001