Class PListParser


  • public final class PListParser
    extends Object
    Plist xml handling (serialization and deserialization)

    The xml plist dtd can be found at http://www.apple.com/DTDs/PropertyList-1.0.dtd

    The plist spec handles 8 types of objects: booleans, real, integers, dates, binary data, strings, arrays (lists) and dictionaries (maps).

    The java Plist lib handles converting xml plists to a nested Map<String, Object> that can be trivially read from java. It also provides a simple way to convert a nested Map<String, Object> into an xml plist representation.

    The following mapping will be done when converting from plist to Map :

     true/false -> Boolean
     real -> Double
     integer -> Integer/Long (depends on size, values exceeding an int will be rendered as longs)
     data -> byte[]
     string -> String
     array -> List
     dict -> Map
     

    When converting from Map -> plist the conversion is as follows:

     Boolean -> true/false
     Float/Double -> real
     Byte/Short/Integer/Long -> integer
     byte[] -> data
     List -> array
     Map -> dict
     
    Author:
    Markus Bernhardt, Copyright 2016, Bernd Rosstauscher, Copyright 2009, Christoffer Lerno / Modified by Bernd Rosstauscher