class CFPropertyList::PlainParser
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], :external_encoding => "ASCII") do |fd| @doc = StringScanner.new(fd.read) end else @doc = StringScanner.new(opts[:data]) end if @doc root = import_plain raise CFFormatError.new('content after root object') unless @doc.eos? return root end raise CFFormatError.new('invalid plist string or file not found') end