[xml] libxml Newbie
- From: "Robert A. Nurse" <rnurse wmata com>
- To: <xml gnome org>
- Subject: [xml] libxml Newbie
- Date: Mon, 09 Jun 2003 11:20:11 -0400
** Proprietary **
Hi,
I'm trying to read a small XML file and add an element off the document root then add
three child elements to this. Here's what I'm currently doing to add the new info:
if ((newVersionNode = xmlNewDocText(doc, (xmlChar *) "Version")))
{
xmlNewTextChild(newVersionNode, NULL, (xmlChar *) "number", (xmlChar *) newVersion);
xmlNewTextChild(newVersionNode, NULL, (xmlChar *) "startTime", (xmlChar *)
newStartTime);
xmlNewTextChild(newVersionNode, NULL, (xmlChar *) "endTime", (xmlChar *)
newEndTime);
xmlSaveFormatFile (xmlDocumentName, doc, 1);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]