class CFPropertyList::NokogiriXMLParser
def load(opts)
* :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, PARSER_OPTIONS) } else doc = Nokogiri::XML::Document.parse(opts[:data], nil, nil, PARSER_OPTIONS) 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