Module: DarwinCore::XmlReader

Defined in:
lib/dwc-archive/xml_reader.rb

Class Method Summary collapse

Class Method Details

.from_xml(xml_io) ⇒ Object



7
8
9
10
11
12
13
14
# File 'lib/dwc-archive/xml_reader.rb', line 7

def from_xml(xml_io) 
  begin
    result = Nokogiri::XML(xml_io)
    return { result.root.name.to_sym => xml_node_to_hash(result.root)} 
  rescue Exception => e
    raise e
  end
end