yaccety_sax
yaccety_sax copied to clipboard
Handle Incomplete Documents in Stream
Hi! This is the other side of a similar issue (#8). We sometimes see incomplete documents in a packet, when a large document was split across multiple packets.
It would be helpful to have an error that to throw
, specifying that the XML was incomplete, but not necessarily invalid. It seems like this could be an option to ys_state
(throw_incomplete :: boolean()
) or something, that when true, throw
s when a document is incomplete, and when false, or causes a fatal error.
I'm going to put some thought into this...
It was kind of what the continuation function was for, but I see now that that forces the caller to not be in complete control of the entire parsing path..
Need to see if a good nights sleep helps me come up with something. 😃