Support for strict parsing of XML
After this being requested 3 times now I think it's time I start looking into this. Most of this can probably be achieved by putting the automatic closing code in a condition such as unless strict? .... end
. While technically this could also be used for HTML I'm not sure how useful that would be. Most websites are either using HTML5 or some broken form of XHTML/HTML4 which probably won't work with strict mode.
Usage wise there are two ways this can be exposed:
- Using an option such as
Oga.parse_xml('...', :strict => true)
- Using a bang method such as
Oga.parse_xml!('...')
I'm not sure yet which one I prefer.