Currently:
- The
:soap provider returns a Nori hash from Savon by default
- The
:xml reader either accepts a Nori hash, or parses XML strings using Nori
Nori is fine for the easy cases but is too lightweight as a general XML tool. We should expose the true XML parsing power of Nokogiri.
Can we make the options work sensibly for a single reader :xml block to provide for both lightweight Nori hashes OR Nokogiri nodes?
The attribute map can read keys from anything that responds to the [] method (remember: proc.call(x) == proc[x]), so it might just be an option for what kind of object we yield for each record, such as:
- a Nori hash (current default)
- A wrapper for xpath as
->(key) { node.at_xpath(key) }
- A wrapper for css as
->(key) { node.at_css(key) }
Currently:
:soapprovider returns a Nori hash from Savon by default:xmlreader either accepts a Nori hash, or parses XML strings using NoriNori is fine for the easy cases but is too lightweight as a general XML tool. We should expose the true XML parsing power of Nokogiri.
Can we make the options work sensibly for a single
reader :xmlblock to provide for both lightweight Nori hashes OR Nokogiri nodes?The attribute map can read keys from anything that responds to the
[]method (remember:proc.call(x)==proc[x]), so it might just be an option for what kind of object we yield for each record, such as:->(key) { node.at_xpath(key) }->(key) { node.at_css(key) }