Solved! (Was: Re: [xml] Extracting multiple XML fragments of the same type
- From: Holger Rauch <Holger Rauch heitec de>
- To: xml gnome org
- Subject: Solved! (Was: Re: [xml] Extracting multiple XML fragments of the same type
- Date: Fri, 23 Aug 2002 14:44:10 +0200 (CEST)
Hi!
I was (finally) able to make it work (might be useful to other people and
maybe also for the docs):
1. create a new XML document
doc = xmlNewDoc( "1.0" );
2. copy the fragment that the new doucment should contain
newNode = xmlDocCopyNode( curNode, doc, 1 );
3. Make newNode the root element of the newly created document
(void) xmlDocSetRootElement( doc, newNode );
4. Check the result using xmlDocDump to stdout
xmlDocDump( stdout, doc );
Greetings,
Holger
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]