From fb6381172837b9bb87c739dbec26bcad20c5db2d Mon Sep 17 00:00:00 2001 From: Dan Fandrich Date: Wed, 6 Feb 2013 21:44:03 +0100 Subject: [PATCH] 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 --- src/curl_xml.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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: " -- 2.30.2