lib/relaton/cli/xml_convertor.rb in relaton-cli-0.1.7 vs lib/relaton/cli/xml_convertor.rb in relaton-cli-0.1.8

- old
+ new

@@ -28,10 +28,14 @@ def default_ext "yaml" end def convert_content(content) - Relaton::Bibcollection.from_xml(content) + if content.root.name == "bibdata" + Bibdata.from_xml(content.to_s) + else + Bibcollection.from_xml(content) + end end def file_content Nokogiri::XML(File.read(file, encoding: "utf-8")) end