[xml] weird segmentatio fault



the following code compiles but gives a segmentation fault at the call
to xmlNewProp.  Any body know why?

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <math.h>
#include <libxml2/libxml/xmlmemory.h>
#include <libxml2/libxml/parser.h>
#include <xmlUtil.h>
#include <taskListStructs.h>
#include <globalFlags.h>

void writePostStepOneXml(struct processList * p, struct process *
S_a,struct process * S_p){
        xmlDocPtr doc;
         xmlNodePtr n;
   xmlNodePtr o;
   xmlNodePtr q;
   xmlNodePtr r;
   doc = xmlNewDoc("1.0");
   n = xmlNewNode(NULL, "taskList");
   xmlDocSetRootElement(doc, n);
   o = xmlNewNode(NULL,"phkProc");
   xmlNewProp(o,"1","2");

   xmlFreeDoc(doc);

   return;
}






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]