When programming iOS apps we can have data in a plist file then read it in/out in a matter of one-two lines with NSDictionary. Does something like this exists on Android? I have already made an app on iOS with a plist file containing a couple of hundred entries. That is just normal XML isn't it? So I can parse the file with SAX/DOM Java parser?
plist (Property List) is a flexible and convenient format for storing application data.
plist file contains critical information about the configuration of an iOS mobile app—such as iOS versions that are supported and device compatibility—which the operating system uses to interact with the app. This file is automatically created when the mobile app is compiled.
Plist files exist in one of three forms:
If the plist file you want to parse is in NeXTSTEP or XML format, it is easy to build a parser for it using existing tools on most platforms. In the case of the XML format, yes you can use Java's inbuilt parser.
If the plist file is binary, however, you will have to either roll your own parser or use an existing third-party class. One exists at http://www.java2s.com/Open-Source/Java-Document/Swing-Library/jide-oss-2.8.3/com/jidesoft/plaf/aqua/BinaryPListParser.java.htm, but I haven't used it myself so I can't vouch for its accuracy/quality/performance.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With