[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

anthony

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
(tmp->childs->next->childs->content);
                entry->mod  = g_strdup
(tmp->childs->next->next->childs->content);
                entry->text = g_strdup
(tmp->childs->next->next->next->childs->content);

                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"?>
<ENTRIES>
  <ENTRY>
    <name>entry</name>
    <date>2000.01.01</date>
    <mod>2001.03.08</mod>
    <text>adasd</text>
  </ENTRY>
---



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

__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/




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