Re: [xml] XPath queries on document fragments without a document

On Thu, Sep 26, 2002 at 03:12:01PM -0700, Sean Chittenden wrote:
I'm using xmlMemSetup() and that made a big difference in terms of
preventing libxml from stepping on Ruby's toes.  I'm actually worried
that there's some place in libxml where it's still not using the
memory routines specified by xmlMemSetup(), but I couldn't find any

  I run constantly in my devel environment with memory debug enabled
and under those conditions, an xmlMalloc'ed passed to free() or
a block allocated with malloc and passed to xmlFree() immediately
generate either an error message or a segfault, this is very very
unlikely to happen.

You know what Matt did in terms reference counting?  I don't think

  Hum, no... ask him :-)

If I parse a document with xmlParseDocument() and the document is well
formed ('<a>b</a>'), when I assign the result out of the parser
context, it seems as though when the parser context is free()'ed that
it's also free()'ing ctxt->myDoc.  If I make a copy of myDoc I seem to

  see for example xmlSAXParseDoc() for how to proceed, if you start
using low level APIs of libxml2, you'd better look at the existing code
in libxml2 making use of it to avoid trial and errors.


Daniel Veillard      | Red Hat Network
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

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