Class: RelatonGb::XMLParser

Inherits:
RelatonIsoBib::XMLParser
  • Object
show all
Defined in:
lib/relaton_gb/xml_parser.rb

Class Method Summary collapse

Class Method Details

.from_xml(xml) ⇒ Object



6
7
8
9
10
# File 'lib/relaton_gb/xml_parser.rb', line 6

def from_xml(xml)
  doc = Nokogiri::XML(xml)
  gbitem = doc.at "/bibitem|/bibdata"
  GbBibliographicItem.new item_data(gbitem)
end