File tree Expand file tree Collapse file tree 1 file changed +23
-27
lines changed Expand file tree Collapse file tree 1 file changed +23
-27
lines changed Original file line number Diff line number Diff line change @@ -807,37 +807,33 @@ SaxParser.prototype.parseFile = function(filename) { //This function will only w
807
807
SaxParser . prototype . parseString = function ( strD ) {
808
808
util = require ( 'util' ) ;
809
809
var that = this ;
810
+ var startnew = true ;
811
+ if ( ! that . m_parser ) {
812
+ that . m_parser = new XMLP ( strD ) ;
813
+ startnew = false ;
814
+ }
815
+ else {
816
+ that . m_parser . continueParsing ( strD ) ;
817
+ startnew = true ;
818
+ }
810
819
811
- setTimeout ( function ( ) {
812
- var startnew = true ;
813
- if ( ! that . m_parser ) {
814
- that . m_parser = new XMLP ( strD ) ;
815
- startnew = false ;
816
- }
817
- else {
818
- that . m_parser . continueParsing ( strD ) ;
819
- startnew = true ;
820
- }
821
-
822
- //if(that.m_hndDoc && that.m_hndDoc.setDocumentLocator) {
823
- // that.m_hndDoc.setDocumentLocator(that);
824
- //}
825
-
826
- that . m_bErr = false ;
820
+ //if(that.m_hndDoc && that.m_hndDoc.setDocumentLocator) {
821
+ // that.m_hndDoc.setDocumentLocator(that);
822
+ //}
827
823
828
- if ( ! that . m_bErr && ! startnew ) {
829
- that . _fireEvent ( SaxParser . DOC_B ) ;
830
- }
831
- that . _parseLoop ( ) ;
832
- if ( ! that . m_bErr && ! that . m_interrupted ) {
833
- that . _fireEvent ( SaxParser . DOC_E ) ;
834
- }
824
+ that . m_bErr = false ;
835
825
836
- that . m_xml = null ;
837
- that . m_iP = 0 ;
838
- that . m_interrupted = false ;
839
- } , 0 ) ;
826
+ if ( ! that . m_bErr && ! startnew ) {
827
+ that . _fireEvent ( SaxParser . DOC_B ) ;
828
+ }
829
+ that . _parseLoop ( ) ;
830
+ if ( ! that . m_bErr && ! that . m_interrupted ) {
831
+ that . _fireEvent ( SaxParser . DOC_E ) ;
832
+ }
840
833
834
+ that . m_xml = null ;
835
+ that . m_iP = 0 ;
836
+ that . m_interrupted = false ;
841
837
}
842
838
843
839
SaxParser . prototype . pause = function ( ) {
You can’t perform that action at this time.
0 commit comments