[xml] xmlDocPtr returned by xmlSAXParseMemory()



Hi!

I've been looking at parser.c, testSAX.c, and the stuff pointed to by 
the links in the James Henstridge's docs. Judging from what I noticed in
there, it seems to me that the xmlDocPtr is assigned the value of
ctxt->myDoc. However, in all the examples I've seen so far, the returned
xmlDocPtr seems to always be discarded. Instead, state transition info
(stored in an enum) is assigned to ctxt->user_data and in all examples
"proprietary" (i.e. non-libxml2 tree API) tree structures
(such as GladeWidgetTree) seem to be used.

My question is: How can I make sure that the document pointed to by
ctxt->myDoc is updated using the libxml2 tree API? Will simply using the
libxml2 tree API functions in the corresponding SAX callbacks guarantee
that the document pointed to by ctxt->myDoc is updated accordingly?

Thank you very much for any advice!

Kind regards,

        Holger




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