Class: Rea::DBLP::QueryResultParser
- Defined in:
- lib/rea-dblp/rea/dblp/query_result_parser.rb
Instance Method Summary collapse
Methods inherited from Parser
Methods included from ErrorUtils
#error_message, #not_found_error!, #not_implemented_error!, #parse_error!, #parse_format_error!, #third_party_error!, #unexpected_error!
Instance Method Details
#parse_text(result, source = nil) ⇒ Object
5 6 7 8 9 10 11 12 13 14 |
# File 'lib/rea-dblp/rea/dblp/query_result_parser.rb', line 5 def parse_text(result, source = nil) entries = [] parse_xml(result, source) do |doc| unrecognized!(source) if doc.xpath('/result').empty? doc.xpath("/result/hits/hit").each do |entry| entries << send(:"xml_parse_hit", entry) end end entries end |