Module: Plist

### Home Classes Methods

### In Files

- lib/facter/util/plist.rb
- lib/facter/util/plist/parser.rb
- lib/facter/util/plist/generator.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

### Files

- LICENSE
- Rakefile
- THANKS

### Class/Module Index

Quicksearch

- Facter
- Facter::Application
- Facter::Manufacturer
- Facter::Memory
- Facter::NetMask
- Facter::Util
- Facter::Util::CFPropertyList
- Facter::Util::CFPropertyList::CFArray
- Facter::Util::CFPropertyList::CFBoolean
- Facter::Util::CFPropertyList::CFData
- Facter::Util::CFPropertyList::CFDate
- Facter::Util::CFPropertyList::CFDictionary
- Facter::Util::CFPropertyList::CFInteger
- Facter::Util::CFPropertyList::CFReal
- Facter::Util::CFPropertyList::CFString
- Facter::Util::CFPropertyList::CFType
- Facter::Util::CFPropertyList::XML
- Facter::Util::Collection
- Facter::Util::CompositeLoader
- Facter::Util::Config
- Facter::Util::Confine
- Facter::Util::DirectoryLoader
- Facter::Util::DirectoryLoader::NoSuchDirectoryError
- Facter::Util::EC2
- Facter::Util::Fact
- Facter::Util::FileRead
- Facter::Util::IP
- Facter::Util::IP::Windows
- Facter::Util::IP::Windows::Bindings4
- Facter::Util::IP::Windows::Bindings6
- Facter::Util::Loader
- Facter::Util::Macaddress
- Facter::Util::Macaddress::Darwin
- Facter::Util::Macaddress::Windows
- Facter::Util::Macosx
- Facter::Util::MonkeyPatches
- Facter::Util::MonkeyPatches::Lines
- Facter::Util::NothingLoader
- Facter::Util::Parser
- Facter::Util::Parser::Base
- Facter::Util::Parser::JsonParser
- Facter::Util::Parser::KeyValuePairOutputFormat
- Facter::Util::Parser::NothingParser
- Facter::Util::Parser::PowershellParser
- Facter::Util::Parser::ScriptParser
- Facter::Util::Parser::TextParser
- Facter::Util::Parser::YamlParser
- Facter::Util::Processor
- Facter::Util::Registry
- Facter::Util::Resolution
- Facter::Util::SolarisZones
- Facter::Util::Uptime
- Facter::Util::Values
- Facter::Util::Virtual
- Facter::Util::Vlans
- Facter::Util::WMI
- Facter::Util::Xendomains
- 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
- CFFormatError
- CFPlistError
- CFTypeError
- IO
- Object
- String

No matching classes.

# Plist

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 )

See Plist::Emit.

### 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/facter/util/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

[Validate]

Generated with the Darkfish Rdoc Generator 2.