Class: DiffResource::XmlParser

Inherits:
Parser
  • Object
show all
Defined in:
lib/diff_resource/parser/xml_parser.rb

Direct Known Subclasses

ResxParser

Instance Method Summary collapse

Methods inherited from Parser

#initialize, #nested_hash_access, #parse_array, #parse_hash, #parsre_target?

Constructor Details

This class inherits a constructor from DiffResource::Parser

Instance Method Details

#parse(str) ⇒ Object



5
6
7
8
9
10
11
# File 'lib/diff_resource/parser/xml_parser.rb', line 5

def parse str
  ret = super str
  ret.each do |item|
    item.value = item.value[0]
  end
  return ret
end

#parse_string(str) ⇒ Object



13
14
15
# File 'lib/diff_resource/parser/xml_parser.rb', line 13

def parse_string str
  return XmlSimple.xml_in str
end