in reply to Re: Reading a particular xml
in thread Reading a particular xml
I don't do much JSON, but the requirement for XML is to die on errors. No guessing, don't be polite about it, just up and die. CSV is a little fuzzier, but I tend to think it's not a bad idea to die on bad CSV. When I try to read CSV with the settings a little bit wrong, I tend to get something so horrific that I prefer that the reader just die.
HTML is a different story - there's enormous amounts of bad html out there and the convention unfortunately is that browsers will tolerate it. In a fair bit of screen-scraping, I haven't really run into problems with HTML parsers barfing, but I think I'm also mostly reading machine-generated HTML (though without guarantees that it's any good).
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Reading a particular xml
by afoken (Chancellor) on Aug 15, 2015 at 09:29 UTC |