char *result;
value = xmlGetProp (node, BAD_CAST attr);
+ if (!value)
+ {
+ error (0, 0, _("cannot find attribute %s on %s"), attr, node->name);
+ return NULL;
+ }
+
result = xstrdup ((const char *) value);
xmlFree (value);
xmlNode *root;
root = xmlDocGetRootElement (doc);
+ if (!root)
+ {
+ error (0, 0, _("cannot locate root element"));
+ xmlFreeDoc (doc);
+ return NULL;
+ }
+
if (rule->ns != NULL)
{
if (root->ns == NULL
}
root = xmlDocGetRootElement (doc);
+ if (!root)
+ {
+ error (0, 0, _("cannot locate root element"));
+ xmlFreeDoc (doc);
+ return false;
+ }
+
if (!(xmlStrEqual (root->name, BAD_CAST "locatingRules")
#if 0
&& root->ns