Revert the special treatment for CDATA introduced in #1071

This commit is contained in:
Akinori MUSHA 2016-11-02 19:35:16 +09:00
parent 07effe5eb4
commit 898e3d8edb

View file

@ -558,14 +558,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.