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

On Thu, Nov 01, 2012 at 06:05:50PM +0000, Cabot Com wrote:

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]