Re: [xml] xmlParseDocument bug in libxml-1.4?

Date view Thread view Subject view Author view

From: Daniel Veillard (Daniel.Veillard@w3.org)
Date: Thu Aug 05 1999 - 01:54:55 EDT


On Wed, Aug 04, 1999 at 04:31:21PM -0500, Charles Kerr wrote:
>
> I'm having trouble getting libxml to parse a sax file.
                           XML rather, right ? ^^^

> It looks like the culprit is xmlParseDocument passing
> the userData to startDocument, which is expecting a
> context pointer:
>
> #0 0xff16b4d8 in startDocument (ctx=0x0) at SAX.c:368
> #1 0xff18e77c in xmlParseDocument (ctxt=0x1c9bc8) at parser.c:4403
> #2 0xff18f520 in xmlSAXParseFile (sax=0xffbee238, filename=0x1762f8 "/users/ckerr/.OPUP/product_table.xml", recovery=0)
> at parser.c:4846

  The problem probably lay out at the level where xmlSAXParseFile()
is called. Did you call xmlParseFile() from your application layer or
did you modify the SAX back-end ?

  My implementation of startDocument() SAX callback expect
to get a valid xmlParserCtxtPtr as the userData data block provided
for the callback, i.e. ctxt->userData == ctxt. This should be the case if
you called the standard API.
  If you decided to use the SAX API instead then, you must provide
your own set of callbacks (or if reusing the ones from SAX.c you must
fullfill the assumption I made that the user data block is the current
xmlParserCtxtPtr block).

Daniel

-- 
Daniel.Veillard@w3.org | W3C, INRIA Rhone-Alpes  | Today's Bookmarks :
Tel : +33 476 615 257  | 655, avenue de l'Europe | Linux, WWW, rpmfind,
Fax : +33 476 615 207  | 38330 Montbonnot FRANCE | rpm2html, XML,
http://www.w3.org/People/W3Cpeople.html#Veillard | badminton, and Kaffe.
----
Message from the list xml@rufus.w3.org
Archived at : http://rufus.w3.org/veillard/XML/messages
to unsubscribe: echo "unsubscribe xml" | mail  majordomo@rufus.w3.org


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Wed Aug 02 2000 - 12:29:40 EDT