[xml] start tag expect

i am writing a program that loads files using libxml1. the program works
for me on FreeBSD, but linux users with libxml1 and libxml2 installed are
reporting a "Start tag expect" error. i want to be using libxml1, so it
may be an issue of my code including/linking the wrong things?

please reply to me directly, as i am not subscribed. thanks very much


here is the error:

/home/klhi/.ithought/ithought_db.xml:2: error: Start 
tag expect, '<' not found 

Segmentation fault

here is the function that is attempting to read the file:

GSList *
ithought_file_load (gchar *path)
        xmlDocPtr        doc;
        xmlNodePtr        tmp;
        GSList                *list = NULL;
        Entry                *entry;

        doc = xmlParseFile (path);
        tmp = doc->root->childs;

        if (tmp) do {
                entry = g_malloc (sizeof (Entry));

                entry->name = g_strdup (tmp->childs->childs->content);
                entry->date = g_strdup
                entry->mod  = g_strdup
                entry->text = g_strdup

                list = g_slist_append (list, entry);
        } while ((tmp = tmp->next));

        xmlFreeDoc (doc);
        return (list);

also, here is the top lines of the file it is trying to read:

<?xml version="1.0"?>

aim: VoltronWing | icq: 78187293
web: http://voltron.emptyrhetoric.com

Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 

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