Re: [xml] Extracting multiple XML fragments of the same type
- From: Daniel Veillard <veillard redhat com>
- To: Holger Rauch <Holger Rauch heitec de>
- Cc: xml gnome org
- Subject: Re: [xml] Extracting multiple XML fragments of the same type
- Date: Fri, 23 Aug 2002 06:10:55 -0400
On Fri, Aug 23, 2002 at 11:56:52AM +0200, Holger Rauch wrote:
Hi Daniel!
Here are my latest news on the subject: I've now recompiled libxml2
version 2.4.23 on Solaris 8 using only "-g" for CFLAGS. I started setting
a breakpoint in xmlDocCopyNode, as you suggested. I then stepped into
every function call and noticed that doc (originally passed to
xmlDocCopyNode()) never appears on the left side of an assignment
statement. This basically means it is left as it is. Shouldn't something
like
doc->children = ret
be present in xmlDocCopyNode() (after the call xmlStaticCopyNode())?
No, the goal is to prepare a copy to be plugged in the target document,
not to modify the target document. Doing doc->children = ret would just generate
an hard coded semantic completely different from the existing one,
break applications, and generate memory leaks.
Your code has to plug the result in the document at the proper place.
Daniel
--
Daniel Veillard | Red Hat Network https://rhn.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]