--- cnijfilter-2.60/printui/src/keytext.c 2006-02-27 03:05:20.000000000 +0100 +++ cnijfilter-2.60/printui/src/keytext.c 2010-05-02 16:32:01.319502729 +0200 @@ -37,7 +37,7 @@ #ifdef USE_LIB_GLADE # include #endif -#include +#include #include #ifndef USE_LIB_GLADE @@ -71,13 +71,13 @@ static void AddKeyAndTextToTree(xmlNodePtr xmlnode, GTree* tree) { - char *key, *text; + xmlChar *key, *text; - if( !xmlnode->name || g_strcasecmp(xmlnode->name,"Item") != 0 ) + if( !xmlnode->name || xmlStrcasecmp(xmlnode->name, xmlCharStrdup("Item")) != 0 ) return; - key = g_strdup(xmlGetProp(xmlnode,"key")); - text = g_strdup(xmlNodeGetContent(xmlnode)); + key = xmlStrdup(xmlGetProp(xmlnode,xmlCharStrdup("key"))); + text = xmlStrdup(xmlNodeGetContent(xmlnode)); if( key != NULL && text != NULL ) { @@ -89,7 +89,7 @@ { xmlNodePtr node; - for( node = doc->root->childs ; node != NULL ; node = node->next ) + for( node = xmlDocGetRootElement(doc)->children ; node != NULL ; node = node->next ) { AddKeyAndTextToTree(node, tree); } @@ -102,9 +102,9 @@ if( (doc = xmlParseFile(fname)) == NULL ) return FALSE; - if( doc->root == NULL - || doc->root->name == NULL - || g_strcasecmp(doc->root->name, "KeyTextList") != 0) + if( xmlDocGetRootElement(doc) == NULL + || xmlDocGetRootElement(doc)->name == NULL + || xmlStrcasecmp(xmlDocGetRootElement(doc)->name, xmlCharStrdup("KeyTextList")) != 0) { xmlFreeDoc(doc); return FALSE;