[xml] libxml Newbie



** 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]