[xml] undefined symbol error with xmlNodeBufGetContent



I am trying to use xmlNodeBufGetContent(...) to read an array of integer
values from an XML Element using the gnome C parser. My code works fine to
parse all the elements, until it comes to this call:
xmlNodeBufGetContent(buf, cur->xmlChildrenNode);

I have included these libraries:

#include <libxml/parser.h>
#include <libxml/xmlmemory.h>
#include <libxml/tree.h>

some of my code:

int parseTable(xmlDocPtr doc, xmlNodePtr cur)
{
  xmlChar *key;
  cur = cur->xmlChildrenNode;

if ((!xmlStrcmp(cur->name, (const xmlChar *)"Name"))) {
            key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
            printf("Name: %s\n", key);
            xmlFree(key);
} else if ((!xmlStrcmp(cur->name, (const xmlChar *)"Data"))) {
            xmlNodeBufGetContent(buf, cur->xmlChildrenNode);
            . . .
}


I am compiling the code using:  gcc -o example `xml2-config --cflags`
example.c `xml2-config --libs` and it compiles without any errors or
warnings. When I run the program, after the line xmlNodeBufGetContent(buf,
cur->xmlChildrenNode); I get the following error: ./example relocation
error: ./example undefined symbol: xmlNodeBufGetContent.

Am I missing a library I have to include? I thought that function was in
tree.h...

Thanks!




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