Module: Plist

### Home Classes Methods

### In Files

- lib/plist/generator.rb
- lib/plist/parser.rb
- lib/plist.rb

### Namespace

- MODULE Plist::Emit
- CLASS Plist::Listener
- CLASS Plist::PArray
- CLASS Plist::PData
- CLASS Plist::PDate
- CLASS Plist::PDict
- CLASS Plist::PFalse
- CLASS Plist::PInteger
- CLASS Plist::PKey
- CLASS Plist::PList
- CLASS Plist::PReal
- CLASS Plist::PString
- CLASS Plist::PTag
- CLASS Plist::PTrue
- CLASS Plist::StreamParser

### Methods

- ::parse_xml

### Class/Module Index

Quicksearch

- Plist
- Plist::Emit
- Plist::Listener
- Plist::PArray
- Plist::PData
- Plist::PDate
- Plist::PDict
- Plist::PFalse
- Plist::PInteger
- Plist::PKey
- Plist::PList
- Plist::PReal
- Plist::PString
- Plist::PTag
- Plist::PTrue
- Plist::StreamParser

No matching classes.

# Plist

Copyright 2006-2010 Ben Bleything and Patrick May 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 )

### Constants

VERSION

### Public Class Methods

parse_xml( filename_or_xml ) click to toggle source

Note that I don't use these two elements much:

    + Date elements are returned as DateTime objects.
    + Data elements are implemented as Tempfiles

Plist::parse_xml will blow up if it encounters a data element. If you encounter such an error, or if you have a Date element which can't be parsed into a Time object, please send your plist file to plist@hexane.org so that I can implement the proper support.

    # File lib/plist/parser.rb, line 25
    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

[Validate]

Generated with the Darkfish Rdoc Generator 2.