Public Methods | |
| nodelistindexequalzero (DOMTestDocumentBuilderFactory factory) | |
| void | runTest () throws java.lang.Throwable |
| String | getTargetURI () |
Static Public Methods | |
| void | main (String[] args) |
Create a list of all the children elements of the third employee and access its first child by using an index of 0. This should result in the whitspace before "employeeId" being selected (employeeId when ignoring whitespace). Further we evaluate its content(by using the "getNodeName()" method) to ensure the proper element was accessed.
Definition at line 49 of file nodelistindexequalzero.java.
|
|
Definition at line 51 of file nodelistindexequalzero.java.
00052 {
00053 super(factory);
00054
00055 }
|
|
|
Reimplemented from DOMTest. Definition at line 84 of file nodelistindexequalzero.java.
00084 {
00085 return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/nodelistindexequalzero";
00086 }
|
|
|
Definition at line 87 of file nodelistindexequalzero.java. References DOMTestCase::doMain().
00087 {
00088 DOMTestCase.doMain(nodelistindexequalzero.class,args);
00089 }
|
|
|
Reimplemented from DOMTestCase. Definition at line 57 of file nodelistindexequalzero.java. References DOMTestCase::assertEquals(), DOMTest::isIgnoringElementContentWhitespace(), and DOMTest::load().
00057 {
00058 Document doc;
00059 NodeList elementList;
00060 Node employeeNode;
00061 NodeList employeeList;
00062 Node child;
00063 String childName;
00064 doc = load("staff");
00065 elementList = doc.getElementsByTagName("employee");
00066 employeeNode = elementList.item(2);
00067 employeeList = employeeNode.getChildNodes();
00068 child = employeeList.item(0);
00069 childName = child.getNodeName();
00070
00071 if(
00072 isIgnoringElementContentWhitespace()
00073 ) {
00074 assertEquals("item0NoWhitespace","employeeId",childName);
00075
00076 }
00077
00078 else {
00079 assertEquals("item0Whitespace","#text",childName);
00080
00081 }
00082
00083 }
|
1.2.13.1 written by Dimitri van Heesch,
© 1997-2001