From: Nilo S. Mismetti (nilo@newpos.com)
Date: Wed Sep 27 2000 - 17:17:24 EDT
I'm using LibXML to parse several documents and works fine.
Now I'm trying to add a new node and works, except that when I save the
result my additions appears on a single line:
<PosDB><UserID><User01>3,1,86</User01></UserID></PosDB>
To add new nodes <UserID> and <User01> I'm using:
if((curSection=xmlNewChild(BaseSection,NULL,lpAppName,NULL)) == NULL)
return(0);
if((curKey=xmlNewTextChild(curSection,NULL,lpKeyName,Valor)) == NULL)
return(0);
lpAppName == "UserID"
lpKeyName == "User01"
Valor == "3,1,86"
To write the XML file I'm using:
xmlIndentTreeOutput=TRUE;
xmlSetDocCompressMode(doc,CompressLevel);
return((xmlSaveFile(FileName,doc) == -1) ? TRUE : FALSE);
A little help will be VERY useful.
Thanks,
Nilo
---- Message from the list xml@rpmfind.net Archived at : http://xmlsoft.org/messages/ to unsubscribe: echo "unsubscribe xml" | mail majordomo@rpmfind.net
This archive was generated by hypermail 2b29 : Wed Sep 27 2000 - 17:44:26 EDT