Module: Plist

Defined in:
lib/plist/parser.rb,
lib/plist.rb

Overview

–########################################################### Copyright 2006, Ben Bleything <[email protected]> and # Patrick May <[email protected]> #

#

Distributed under the MIT license. #

++ Plist parses Mac OS X xml property list files into ruby data structures.

Load a plist file

This is the main point of the library:

r = Plist::parse_xml( filename_or_xml )

Defined Under Namespace

Classes: Listener, PArray, PData, PDate, PDict, PFalse, PInteger, PKey, PList, PReal, PString, PTag, PTrue, StreamParser

Constant Summary collapse

VERSION =
'3.0.0'

Class Method Summary collapse

Class Method Details

.parse_xml(filename_or_xml) ⇒ Object

[email protected] so that I can implement the proper support.



24
25
26
27
28
29
30
# File 'lib/plist/parser.rb', line 24

def Plist::parse_xml( filename_or_xml )
  listener = Listener.new
  #parser = REXML::Parsers::StreamParser.new(File.new(filename), listener)
  parser = StreamParser.new(filename_or_xml, listener)
  parser.parse
  listener.result
end