From: Dan Fandrich Date: Wed, 6 Feb 2013 20:44:03 +0000 (+0100) Subject: curl_xml plugin: Allow XML element nodes to be selected for text X-Git-Tag: collectd-5.3.0~34 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=fb6381172837b9bb87c739dbec26bcad20c5db2d;p=collectd.git curl_xml plugin: Allow XML element nodes to be selected for text This is a pretty basic use case, namely to select text within an XML element, instead of just attribute values. Signed-off-by: Florian Forster --- diff --git a/src/curl_xml.c b/src/curl_xml.c index fc02859e..eda87d09 100644 --- a/src/curl_xml.c +++ b/src/curl_xml.c @@ -245,7 +245,8 @@ static xmlXPathObjectPtr cx_evaluate_xpath (xmlXPathContextPtr xpath_ctx, /* {{{ static int cx_if_not_text_node (xmlNodePtr node) /* {{{ */ { - if (node->type == XML_TEXT_NODE || node->type == XML_ATTRIBUTE_NODE) + if (node->type == XML_TEXT_NODE || node->type == XML_ATTRIBUTE_NODE || + node->type == XML_ELEMENT_NODE) return (0); WARNING ("curl_xml plugin: "