Re: [libxml++] xmlpp::DomParser w/ multiple files

Le Lundi 9 Juin 2003 14:07, Daniel Hedlund a écrit :
> G'day,


>      Your group's project is great and I'm helping by using the libraries
> and giving feedback.

Thanks for your interest in libxml++

>  I'm not sure if
> there is already something implemented in xmlpp yet but it would be great
> if you could be able to "detach" or
> copy a node (ie. the root node) from the parser so when the parser goes
> to open up a second file that the
> original parsed node tree will still exist?
> 1.  Open up XML file 1 (xml1)
> 2.  Detach the root node from the parser (rn1)
> 3.  Open up XML file 2 (xml2)
> 4.  still have access to rn1

There is no such feature for now.
To do so there is two ways :

1. Add a function to DomParser to detach a Document from the parser and avoid 
it to be released by the DomParser
for example :
	Document DomParser::detach_document()
	Document DomParser::release_document()

2. Give the possibility to detach any node (and all its children) from a tree, 
and to attach it anywhere we want. These could be done with functions like 
Node::attach_node(Node *) / Node::detach_node(Node *).

The 1. should be quite trivial to implement, a patch would be very welcome.
2. implies more reflexion. If someone has ideas on how to do that and want to 
propose a patch, we can discuss it.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]