Re: [xml] using xmlDocSetRootElement to move nodes between documents

On Wed, Jul 28, 2004 at 10:31:23AM +0200, Martijn Faassen wrote:
Daniel Veillard wrote:
 Since doc1 and doc2 are not sharing their dictionnary, yes you have a 
If you're starting to move nodes between documents like that you can either
desactivate dictionnaries or make sure they share dictionnaries. Use one of
the more recent APIs like xmlReadDoc() and set XML_PARSE_NODICT option.

Thanks for the info. I need to investigate the use of dictionaries then. 
Is that the only thing that can trip me up? Igor elsewhere in the threat 
mentions namespaces, for instance. I presume this is because libxml2 
doesn't actually store namespace URIs in the nodes but does a look up 
based on prefix, or do I understand that wrong?

  You are right. There have been attempts to solve this with xmlReconciliateNs
in tree.c this should solve namespace problems. Other potential problem is
entities references.


Daniel Veillard      | Red Hat Desktop team
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]