- cur = xmlDocGetRootElement(doc);
- if (cur == NULL) {
- LOGE("empty document %s file!!!", XML_FILE_PATH);
- xmlFreeDoc(doc);
- return SYSTEM_INFO_ERROR_IO_ERROR;
- }
-
- if (xmlStrcmp(cur->name, (const xmlChar*)"sysinfo")) {
- LOGE("document of the wrong type, root node != sysinfo");
- xmlFreeDoc(doc);
- return SYSTEM_INFO_ERROR_IO_ERROR;
- }
-
- cur = cur->xmlChildrenNode;
-
- for (cur_node = cur; cur_node; cur_node = cur_node->next) {
- if (cur_node->type == XML_ELEMENT_NODE) {
- id = (char *)g_strdup((char*)xmlGetProp(cur_node, (const xmlChar*)"id"));
- string = (char *)g_strdup((char *) xmlGetProp(cur_node, (const xmlChar*)"string"));