Re: [xml] HTML parser and NULL bytes
- From: Michael Day <mikeday yeslogic com>
- To: ashwin sinha <4shw1ns1nh4 gmail com>
- Cc: xml gnome org
- Subject: Re: [xml] HTML parser and NULL bytes
- Date: Wed, 06 Aug 2008 09:42:42 +1000
Hi Ashwin,
I am not sure if I understand the scenario correctly, but in case you
are trying to give a NULL byte as text content in xml, then i don't
think any XML compliant parser will parse it, according to the XML draft
this is invalid.
That is correct, and libxml2 correctly handles this case by printing an
error message and terminating the parse.
However, libxml2 also has a HTML parser, and the HTML5 spec says that
NULL bytes do not terminate the document (they are invalid, but you
should just replace them with U+FFFD and keep going). Also, the libxml2
HTML parser does not even print an error in this case, it just stops.
Michael
--
Print XML with Prince!
http://www.princexml.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]