class CFPropertyList::NokogiriXMLParser

def load(opts)

* :data - The data to parse
* :file - The filename of the file to load
opts::
read a XML file
def load(opts)
  doc = nil
  if(opts.has_key?(:file)) then
    File.open(opts[:file], "rb") { |fd| doc = Nokogiri::XML::Document.parse(fd, nil, nil, Nokogiri::XML::ParseOptions::NOBLANKS|Nokogiri::XML::ParseOptions::NOENT) }
  else
    doc = Nokogiri::XML::Document.parse(opts[:data], nil, nil, Nokogiri::XML::ParseOptions::NOBLANKS|Nokogiri::XML::ParseOptions::NOENT)
  end
  if doc
    root = doc.root.children.first
    return import_xml(root)
  end
rescue Nokogiri::XML::SyntaxError => e
  raise CFFormatError.new('invalid XML: ' + e.message)
end