soulcutter / saxerator

A SAX-based XML parser for parsing large files into manageable chunks
MIT License
128 stars 19 forks source link

Added handling error on XML data structure. #59

Closed fanantoxa closed 7 years ago

fanantoxa commented 7 years ago

Issue: https://github.com/soulcutter/saxerator/issues/55 Added for all except REXML. For REXML it works partly.

For <body><item>test</body> it works good and raise an exception. But REXML doesn't raise and exception we we have no closing tag like here: <body><item>test</item>

@soulcutter I'm not sure what to do here. Is it OK to leave it like this and update a readme that we'll not getting exeption in this case? Or wait for response from Ruby devs?

PS Already created a bug here: https://bugs.ruby-lang.org/issues/13636

fanantoxa commented 7 years ago

@soulcutter Actually bug already fixed: https://bugs.ruby-lang.org/issues/13636 But fix will apear on ruby 2.5. So, what you think we can do here? All works good. But REXML doesn't handle when root tag not closed.

soulcutter commented 7 years ago

This looks good to me - I would ignore the REXML situation, particularly since it is fixed in future ruby. I would just exclude Rexml from the tests that would make it fail (for now)

soulcutter commented 7 years ago

Also awesome work on the Ruby bug report! Very cool that it got fixed so quickly.