The characters() method returns the text that occurs between tags. Nowever, the newlines appear to be deleted, resulting in the last word on one line being joined to the first word on the next line, with no intervening space.
Not repeatable with hotsax0.1.2.b which passes the following test:
InputSource input = new InputSource(new StringReader(" <p>\n" + "This is some\n" + "new information\n" + "for you\n" + "</p>\n" + "\n" + ""));
parser.parse(input);
String expected = "\n" + "This is some\n" + "new information\n" + "for you\n";
Assert.assertThat(startEvent.text().getBytes(), is(expected.getBytes()));
Log in to post a comment.
Not repeatable with hotsax0.1.2.b which passes the following test:
InputSource input = new InputSource(new StringReader(" <p>\n" +
"This is some\n" +
"new information\n" +
"for you\n" +
"</p>\n" +
"\n" +
""));
parser.parse(input);
String expected = "\n" +
"This is some\n" +
"new information\n" +
"for you\n";
Assert.assertThat(startEvent.text().getBytes(), is(expected.getBytes()));