You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There doesn't seem to be any way to specify that parseString() will not be called again (end of input.)
Thus there seems to be no way to detect an incomplete document. I'm getting xml over http, and I don't want my app to hang forever waiting for xml parsing if I get an incomplete document over http.
When I remove the last parseString call from example.js it does call endDocument at the end, but it also calls it 4 other times, so it's unusable.
Here's what I want: a second parameter to parseString (boolean) that says whether this is the final hunk or not.
If I specify that it's the final hunk, the onError event will fire if the document hasn't closed all the nodes or whatever.
Thanks!
The text was updated successfully, but these errors were encountered:
Note that if I concatenate all the parseString() args in example.js and call parseString() once like this:
parser.parseString("<html><body>"
+ "<!-- This is the start"
+ " and the end of a comment -->"
+ "and lots"
+ "and lots of text&am"
+ "p;some more."
+ "<![CD"
+ "ATA[ this is"
+ " cdata ]]>"
+ "</body"
+ "></html>"
);
But if you comment out the ></html> line, no endDocument or Error or anything fires.
There doesn't seem to be any way to specify that parseString() will not be called again (end of input.)
Thus there seems to be no way to detect an incomplete document. I'm getting xml over http, and I don't want my app to hang forever waiting for xml parsing if I get an incomplete document over http.
When I remove the last parseString call from example.js it does call endDocument at the end, but it also calls it 4 other times, so it's unusable.
Here's what I want: a second parameter to parseString (boolean) that says whether this is the final hunk or not.
If I specify that it's the final hunk, the onError event will fire if the document hasn't closed all the nodes or whatever.
Thanks!
The text was updated successfully, but these errors were encountered: