module DarwinCore::XmlReader
USAGE: Hash.from_xml:(YOUR_XML_STRING) modified from stackoverflow.com/questions/1230741/ convert-a-nokogiri-document-to-a-ruby-hash/1231297#1231297
Public Class Methods
from_xml(xml_io)
click to toggle source
# File lib/dwc_archive/xml_reader.rb, line 9 def self.from_xml(xml_io) result = Nokogiri::XML(xml_io) { result.root.name.to_sym => self::Node.new(result.root).value } end