- /* ignoring the element if other than textnode/attribute */
- if (cx_if_not_text_node(instance_node->nodeTab[0])) {
- WARNING("curl_xml plugin: "
- "relative xpath expression \"%s\" is expected to return only "
- "text node which is not the case. Skipping the node.",
- xpath->plugin_instance_from);
- xmlXPathFreeObject(instance_node_obj);
- return -1;
- }
-
- if (instance_node != NULL) {
- char *node_value = (char *)xmlNodeGetContent(instance_node->nodeTab[0]);
- sstrncpy(vl->plugin_instance, node_value, sizeof(vl->plugin_instance));
- sfree(node_value);
- }
-
- /* Free `instance_node_obj' this late, because `instance_node' points to
- * somewhere inside this structure. */
- xmlXPathFreeObject(instance_node_obj);
- } /* if (xpath->plugin_instance_from != NULL) */