Sha256: 59c4650e5e7b97e0c105435a2a9d4465dd22547e1834c3becc029c79f24cfcb2

Contents?: true

Size: 409 Bytes

Versions: 3

Compression:

Stored size: 409 Bytes

Contents

module RelatonUn
  class XMLParser < RelatonBib::XMLParser
    class << self
      def from_xml(xml)
        doc = Nokogiri::XML xml
        doc.remove_namespaces!
        titem = doc.at("/bibitem|/bibdata")
        if titem
          UnBibliographicItem.new(item_data(titem))
        else
          warn "[relaton-un] can't find bibitem or bibdata element in the XML"
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
relaton-un-0.2.0 lib/relaton_un/xml_parser.rb
relaton-un-0.1.1 lib/relaton_un/xml_parser.rb
relaton-un-0.1.0 lib/relaton_un/xml_parser.rb