Re: [xml] Namespace errors with XML fragement parsed by XMLReader
- From: Daniel Veillard <veillard redhat com>
- To: Cabot Com <cabotcom gmail com>
- Cc: xml gnome org
- Subject: Re: [xml] Namespace errors with XML fragement parsed by XMLReader
- Date: Fri, 2 Nov 2012 09:34:18 +0800
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
veillard redhat com | libxml Gnome XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | virtualization library http://libvirt.org/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]