robrighter / node-xml

An xml parser for node.js written in javascript.
197 stars 59 forks source link

Xml escaped characters trigger a new text event. #19

Open wampleek opened 13 years ago

wampleek commented 13 years ago

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.