[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: [xml] Problems with xmlDocDump
- From: Daniel Veillard <veillard redhat com>
- To: Antti Mäkinen <antti makinen helsinki fi>
- Cc: xml gnome org
- Subject: Re: [xml] Problems with xmlDocDump
- Date: Wed, 8 Jun 2005 04:54:39 -0400
On Wed, Jun 08, 2005 at 09:56:32AM +0300, Antti Mäkinen wrote:
> Hi everyone,
>
> I have a program that parses a long xml datafile in chunks ("computing
> units") in order to avoid huge DOM tree. The program parses one computing
> unit at a time into a DOM tree, does a lot of calculations with the data in
> the unit, attaches a set of new nodes as children of that computing unit
> and then it should dump the resulting modified computing unit into a file.
>
> The problem is that when I try to dump the contents of the computing unit
> into a file with xmlDocDump, the program crashes with some "Unhandled
> exception (libxml2.dll) 0xC000005: Access Violation."
>
> I have the DOM tree in an xmlNode and I cast the xmlNode into xmlDoc in the
> xmlDocDump call. Is that legal or should I have the computing unit stored
> in an xmlDoc?
libxml2 has API to dump subtrees like the following. Use them !
http://xmlsoft.org/html/libxml-tree.html#xmlElemDump
elements being parsed are generated within a document, always.
I don't know how you do the parsing but the leanest solution would be to
use the reader interface and its expand function.
Daniel
--
Daniel Veillard | Red Hat Desktop team http://redhat.com/
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]