prewk / xml-string-streamer

Stream large XML files with low memory consumption.
MIT License
356 stars 49 forks source link

add Reset Parser state to fully support Stream Rewind #77

Closed jDolba closed 3 years ago

jDolba commented 3 years ago

as per #67 rewinding stream does not reset Parser internal state so once rewindend, few initial chunk products might be corrupted

if you are using Stream Rewind methods, you have to explicitly Reset Parsers as well

unit tests in this PR are quite verbose to describe what is happening without Reseting Parsers

prewk commented 3 years ago

Thanks a lot, this has fallen between chairs on my part. I'll try to check it out soon. Sorry.

prewk commented 3 years ago

Looks good, I'll bump a minor for it. Thanks!