Class: Nice::XMLParser

Inherits:
Parser
  • Object
show all
Defined in:
lib/nice/diff/parser.rb

Instance Method Summary collapse

Instance Method Details

#parse_to_array(context) ⇒ Object



20
21
22
23
24
25
# File 'lib/nice/diff/parser.rb', line 20

def parse_to_array(context)   
  context.key = 'Tag'
  xml1 = Nokogiri::XML(context.expected_file).to_s
  xml2 = Nokogiri::XML(context.actual_file).to_s
  [Hash.from_xml(xml1).values, Hash.from_xml(xml2).values]
end