class NokogiriPList::Parser

def parse(xml, options={})

def parse(xml, options={})
  @converters = {
    'integer' => Proc.new { |node| node.content.to_i },
    'real'    => Proc.new { |node| node.content.to_f },
    'string'  => Proc.new { |node| node.content.to_s },
    'date'    => Proc.new { |node| DateTime.parse(node.content) },
    'true'    => Proc.new { |node| true },
    'false'   => Proc.new { |node| false },
    'dict'    => Proc.new { |node| parse_dict node },
    'array'   => Proc.new { |node| parse_array node },
    'data'    => Proc.new { |node| node.content.to_s }
  }.merge(options[:converters] || {})
  @dict_class = options[:dict_class] || Hash
  plist = xml.root
  plist = plist.children.first if plist.name == "plist"
  parse_value_node next_valid_sibling plist
end