On Thu, Nov 01, 2012 at 06:05:50PM +0000, Cabot Com wrote:
> Hi,
> 
> 
> 
> I’m parsing an XML fragment (rather than a complete document) using
> XMLReader. The fragment contains some elements with namespace declarations,
> I had expected the reader to just ignore these namespace declarations
> rather than exit on the first read() operation. However XMLReader does just
> that, exits with an error on the first read().

  Hum, how do you do the parsing ? Namespace errors have to be reported
but should not block parsing. However I found recently that the push
parser (used by the reader) would fail on non-fatal errors reported by
the parser, and that would be one such problem. See the last chunk of

http://git.gnome.org/browse/libxml2/commit/?id=6c91aa384f48ff6d406553a6dd47fd556c1ef2e6

basically if the XML parser still think the document is well-formed
then procesing should continue and return 0 as the error instead
of the actual error.
  If you could try against one of the snapshot tarballs, that would be
helpful,

Daniel


-- 
Daniel Veillard      | Open Source and Standards, Red Hat
[email protected]  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | virtualization library  http://libvirt.org/
_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
[email protected]
https://mail.gnome.org/mailman/listinfo/xml

Reply via email to