Re: [xml] using xmlSetExternalEntityLoader to return internally generated XML documents
- From: Daniel Veillard <veillard redhat com>
- To: Nathan Day <nathan_day mac com>
- Cc: xml gnome org
- Subject: Re: [xml] using xmlSetExternalEntityLoader to return internally generated XML documents
- Date: Wed, 1 Aug 2007 02:13:36 -0400
On Wed, Aug 01, 2007 at 03:24:27PM +1000, Nathan Day wrote:
Looking at the source, it seems that I have to serialise my xml
document so that libxml can parse it again, is that right, seems like
a bit of a waste of time, though I guess for some situations at least
(xinclude) if xmlSetExternalEntityLoader could accept an
xmlDoc, the xmlDoc would have to be copied so maybe it is not that
much more overhead.
libxml2 parser is actually faster than copying a tree (lot of complex
reasons for that), so that may not be that bad. The problem of your
approach in general is that you try to mix what is 2 different level,
the entity one and the tree one, the entity loader is really designed
for data waiting to be parsed, otherwise use the tree APIs.
Daniel
--
Red Hat Virtualization group http://redhat.com/virtualization/
Daniel Veillard | virtualization library http://libvirt.org/
veillard redhat com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]