Re: [xml] Moving XML_ENTITY_REF_NODEs between documents using xmlAddChild()
- From: Daniel Veillard <veillard redhat com>
- To: John Marshall <John Marshall ec gc ca>
- Cc: xml gnome org
- Subject: Re: [xml] Moving XML_ENTITY_REF_NODEs between documents using xmlAddChild()
- Date: Tue, 31 Oct 2006 20:04:19 -0500
On Tue, Oct 31, 2006 at 10:47:56PM +0000, John Marshall wrote:
Hi,
In the process of moving some nodes from one document
to another, I bumped into XML_ENTITY_REF_NODE nodes
not being "fixed up" (i.e., there are references to the
XML_ENTITY_DECL node of the original document) when I
did xmlUnlinkNode(), then xmlAddChild().
Are there any suggestions about how to handle this
while my target document does not yet contain a
suitable XML_ENTITY_DECL to be referenced?
Find the XML_ENTITY_DECL and copy its content recursively
i.e. do a replace or insert an XML_ENTITY_REF_NODE with only
NULL pointers except for the entity name (and parent/siblings)
I don't see any other solution.
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]