Public Methods | |
| elementgetelementsbytagnameaccessnodelist (DOMTestDocumentBuilderFactory factory) | |
| void | runTest () throws java.lang.Throwable |
| String | getTargetURI () |
Static Public Methods | |
| void | main (String[] args) |
Create a NodeList of all the descendant elements using the string "employee" as the tagName. The method should return a NodeList whose length is "5" in the order the children were encountered. Access the FOURTH element in the NodeList. The FOURTH element also has children and the first child of this element should be "text".
Definition at line 50 of file elementgetelementsbytagnameaccessnodelist.java.
|
|
Definition at line 52 of file elementgetelementsbytagnameaccessnodelist.java.
00053 {
00054 super(factory);
00055
00056 }
|
|
|
Reimplemented from DOMTest. Definition at line 83 of file elementgetelementsbytagnameaccessnodelist.java.
00083 {
00084 return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/elementgetelementsbytagnameaccessnodelist";
00085 }
|
|
|
Definition at line 86 of file elementgetelementsbytagnameaccessnodelist.java. References DOMTestCase::doMain().
00086 {
00087 DOMTestCase.doMain(elementgetelementsbytagnameaccessnodelist.class,args);
00088 }
|
|
|
Reimplemented from DOMTestCase. Definition at line 58 of file elementgetelementsbytagnameaccessnodelist.java. References DOMTestCase::assertEquals(), DOMTest::isIgnoringElementContentWhitespace(), and DOMTest::load().
00058 {
00059 Document doc;
00060 NodeList elementList;
00061 Element testEmployee;
00062 Node firstC;
00063 String childName;
00064 doc = load("staff");
00065 elementList = doc.getElementsByTagName("employee");
00066 testEmployee = (Element)elementList.item(3);
00067 firstC = testEmployee.getFirstChild();
00068 childName = firstC.getNodeName();
00069
00070 if(
00071 isIgnoringElementContentWhitespace()
00072 ) {
00073 assertEquals("nodename_nowhitespace","employeeId",childName);
00074
00075 }
00076
00077 else {
00078 assertEquals("nodename_whitespace","#text",childName);
00079
00080 }
00081
00082 }
|
1.2.13.1 written by Dimitri van Heesch,
© 1997-2001