"Be liberal in what you accept, and conservative in what you send." -Jon Postel
Right now I'm using the chrome browser, but I've experienced the same in the past with Firefox.
JS code like...
(new DOMParser).parseFromString("<doc attr=\"foo\" attr=\"foo\" />","text/xml")
returns a pukey parsererror
page instead of anything useful.
Presently, I'm consuming what superficially appear to be XML documents that actually have this problem. That is, some elements have the same attribute twice.
In accordance with the above-mentioned principle, I'd like my program (built upon the browser's DOMParser object) to do better than just throw its hands up in the face of inputs like these.
I don't really care if the first, last, or otherwise value for the attribute is taken.
Question: Is there a way to have the parser be less strict?