Permalink
Browse files

Now endDocument is still called even when using pause & resumes.

  • Loading branch information...
1 parent 6f62071 commit cbfd608d0281ea52931ce0b61867323890c32b48 Alex Latchford committed Sep 10, 2012
Showing with 5 additions and 0 deletions.
  1. +5 −0 lib/node-xml.js
View
@@ -839,10 +839,15 @@ SaxParser.prototype.pause = function() {
SaxParser.prototype.resume = function() {
//reset the state
this.m_parser.resume();
+ this.m_interrupted = false;
+
//now start up the parse loop
var that = this;
setTimeout(function(){
that._parseLoop();
+ if(!that.m_bErr && !that.m_interrupted) {
+ that._fireEvent(SaxParser.DOC_E);
+ }
}, 0);
}

0 comments on commit cbfd608

Please sign in to comment.