class ElsevierApi::XMLResponse::ElsevierApi::XMLResponse::Searchresults
Public Instance Methods
entries_to_ary()
click to toggle source
# File lib/elsevier_api/xml_response/search_results.rb, line 35 def entries_to_ary @xml.xpath("//atom:entry").map {|v| title=v.at_xpath("dc:title").nil? ? nil : v.at_xpath("dc:title").text journal=v.at_xpath("prism:publicationName").nil? ? nil : v.at_xpath("prism:publicationName").text h={ :scopus_id=>v.at_xpath("dc:identifier").text, :title=>title, :journal=>journal } {:creator=>"dc:creator",:doi=>"prism:doi"}.each_pair {|key,xv| h[key]=v.at_xpath(xv).text unless v.at_xpath(xv).nil? } h } end
next_page()
click to toggle source
# File lib/elsevier_api/xml_response/search_results.rb, line 32 def next_page @xml.at_xpath("//atom:link[@ref='next']") end