Merge pull request #1770 from cantino/revert-1071

Revert the special treatment for CDATA introduced in #1071
This commit is contained in:
Akinori MUSHA 2016-11-03 12:14:42 +09:00 committed by GitHub
commit 1e70b31e7f

View file

@ -564,14 +564,7 @@ module Agents
case nodes
when Nokogiri::XML::NodeSet
result = nodes.map { |node|
value = node.xpath(extraction_details['value'] || '.')
if value.is_a?(Nokogiri::XML::NodeSet)
child = value.first
if child && child.cdata?
value = child.text
end
end
case value
case value = node.xpath(extraction_details['value'] || '.')
when Float
# Node#xpath() returns any numeric value as float;
# convert it to integer as appropriate.