lib/bolognese/readers/datacite_reader.rb in bolognese-0.15.3 vs lib/bolognese/readers/datacite_reader.rb in bolognese-0.15.6
- old
+ new
@@ -52,10 +52,10 @@
doc = Nokogiri::XML(string, nil, 'UTF-8', &:noblanks)
ns = doc.collect_namespaces.find { |k, v| v.start_with?("http://datacite.org/schema/kernel") }
schema_version = Array.wrap(ns).last || "http://datacite.org/schema/kernel-4"
doc.remove_namespaces!
string = doc.to_xml(:indent => 2)
-
+
meta = Maremma.from_xml(string).to_h.fetch("resource", {})
# validate only when option is set, as this step is expensive and
# not needed if XML comes from DataCite MDS
if options[:validate]