Re: [xml] Namespace errors with XML fragement parsed by XMLReader

Hi Daniel,
Thanks for the reponse so quickly. I did try the patch changes to 'parser.c' and that did seem to do the trick in the same way as surpressing the errors had.
I'll let you know how we get on when our current sprint is over and we've done some more testing.
I did also notice that the options for no warnings and errors didn't seem to propogate to the area of the code where the namepsace errors were raised, I don't know if this is an issue though.
Best regards,

On Fri, Nov 2, 2012 at 1:34 AM, Daniel Veillard <veillard redhat com> wrote:
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

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


Daniel Veillard      | Open Source and Standards, Red Hat
veillard redhat com  | libxml Gnome XML XSLT toolkit | virtualization library

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]