mirror of
https://github.com/Fishwaldo/huginn.git
synced 2025-03-15 19:31:26 +00:00
Merge pull request #1770 from cantino/revert-1071
Revert the special treatment for CDATA introduced in #1071
This commit is contained in:
commit
1e70b31e7f
1 changed files with 1 additions and 8 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Reference in a new issue