Public Methods | |
| characterdatasubstringexceedsvalue (DOMTestDocumentBuilderFactory factory) | |
| void | runTest () throws java.lang.Throwable |
| String | getTargetURI () |
Static Public Methods | |
| void | main (String[] args) |
Retrieve the character data from the second child of the first employee and access part of the data by using the substringData(offset,count) method with offset=9 and count=10. The method should return the substring "Martin" since offset+count > length (19 > 15).
Definition at line 48 of file characterdatasubstringexceedsvalue.java.
|
|
Definition at line 50 of file characterdatasubstringexceedsvalue.java.
00051 {
00052 super(factory);
00053
00054 }
|
|
|
Reimplemented from DOMTest. Definition at line 70 of file characterdatasubstringexceedsvalue.java.
00070 {
00071 return "http://www.w3.org/2001/DOM-Test-Suite/level1/core/characterdatasubstringexceedsvalue";
00072 }
|
|
|
Definition at line 73 of file characterdatasubstringexceedsvalue.java. References DOMTestCase::doMain().
00073 {
00074 DOMTestCase.doMain(characterdatasubstringexceedsvalue.class,args);
00075 }
|
|
|
Reimplemented from DOMTestCase. Definition at line 56 of file characterdatasubstringexceedsvalue.java. References DOMTestCase::assertEquals(), and DOMTest::load().
00056 {
00057 Document doc;
00058 NodeList elementList;
00059 Node nameNode;
00060 CharacterData child;
00061 String substring;
00062 doc = load("staff");
00063 elementList = doc.getElementsByTagName("name");
00064 nameNode = elementList.item(0);
00065 child = (CharacterData)nameNode.getFirstChild();
00066 substring = child.substringData(9,10);
00067 assertEquals("characterdataSubStringExceedsValueAssert","Martin",substring);
00068
00069 }
|
1.2.13.1 written by Dimitri van Heesch,
© 1997-2001