If the parser sees the text "<p>This is some html text.</p>" (properly escaped), it will call the text handler 7 times:
<
p
>
This is some html text.
<
/p
>
I believe this choice was made b/c unescaping the characters changes the text length, and it's easier just to send the callback event and move on rather than deal with the changes in indices. However, it would be a significant improvement to pass a single block of text to the onCharacters event.
If the parser sees the text "<p>This is some html text.</p>" (properly escaped), it will call the text handler 7 times: < p > This is some html text. < /p > I believe this choice was made b/c unescaping the characters changes the text length, and it's easier just to send the callback event and move on rather than deal with the changes in indices. However, it would be a significant improvement to pass a single block of text to the onCharacters event.