Re: [xml] Problem with XML output formatting
- From: Petyo Milotinov <petyo securax org>
- To: xml gnome org
- Subject: Re: [xml] Problem with XML output formatting
- Date: Wed, 21 Sep 2005 19:54:50 +0300
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Petyo Milotinov wrote:
I remove a node in this way (node is pointing to "general" node):
if ( !xmlStrcmp( node->name, (const xmlChar*)"value2") )
{
xmlNodePtr node_to_del = node;
node = node->next;
xmlUnlinkNode( node_to_del );
xmlFreeNode( node_to_del );
continue;
}
'node' is pointing to children of "general" node
I'm inserting a new node in this way (orig_node is same as node):
xmlNewChild( orig_node, NULL, (const xmlChar*)"value4", (const
xmlChar*)"Just another text" );
And here is the result in saved file:
<options>
<general>
<value1>some text</value1>
<value3>another text 2</value3>
<value4>Just another text</value4></options>
</general>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFDMZBaH/3eKQaFKT0RAoOtAJsGyeLdnEDnVO8jxN0mvIk7eYl3XACfbZ7J
rrv59QTu6XQ3Ba9RPt9X+uY=
=X2qn
-----END PGP SIGNATURE-----
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]