2016年4月25日星期一

How to Convert Apple Property List to XML on Mac

As we all know that plist file extension is associated mainly with Mac OS X and iOS, but is also used in NeXTSTEP, and GNUstep programming frameworks.

A file with the plist file extension is a property file, a XML file using Apple’s plist DTD. Plist stands for Property List, and refers to the fact that *.plist files typically hold lists of properties.


*.plist files are a standard part of OS X Core Foundation, so you’ll find them used by many OSX native applications.
You can edit *.plist files using a text editor, or Apple’s PropertyListEditor, found on the Developer CD or on Apple’s web site.

Example of code in Apple's property list file:


<?xml version="1.0" encoding="UTF-8"?>
   <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"    "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
   <array>
      <string>pages-trunk-20080703_5</string>
      <string>pages-trunk-20080707_3</string>
      <string>pages-trunk-20080904_1</string>
      <string>5B54</string>
   </array>
</plist>

Plist files contain preference specifics and properties relevant to a particular application or portion of Mac OS X system software. Depending on where the plist file is located and what function they serve, they can either be in XML format, binary format, and sometimes even json. 


For users who need to modify a plist file or convert the file format to or from XML and binary, you can do so easily with the help of the Datastorm.

Just like what people need a help:

Is there any easy way (other than writing code) to convert a numbers (could be .csv) file into a .plist?

when I try to open the file in propertylist editor it compains that "string is empty - could not be converted"

Is this even a smart thing to do?

I'm thinking of including this as a resource file with a distribution - would this be too big and unwieldy? ie; is it time to move to sqlite or coredata?

Convert your plist file to csv with the following supported softwares.

Need to convert some files? If you are a student, a public servant or business owner, you will need to share files of all kinds. Having a need to convert a file quickly under pressure is common these days. Don’t waste time – use 
Datastorm to convert files FAST!

Datastorm is a convert tool designed to let you convert files quickly, lets you change document formats. It’s your go-to utility for getting things done.




DataStorm Features:
  • Convert between JSON, XML, CSV, PLIST,.properties(java) and YML (YAML) , from one format to another.
  • Multi-language support ( Translate by TryToTranslate).
  • Batch conversion.
  • Convert formats between JSON XML INI CSV YAML PROPERTIES PLIST. Load from File and Convert to File.


Wonderful things people are saying about DataStorm

"DataStorm is stunning. Simple. Clean. Perfect. Well done." 

                                                                               --Leopold, Technology Evangelist

"DataStorm is what I do pretty much all of my working. It's a great little app."

                                                                               --Jesse, PHP Framework Designer

"If you have any interest in barcode, DataStorm is definitely worth a download."

                                                                               --Glen, Web Developer and Designer

"I really like DataStorm, has brought much convenience for my work."

                                                                               --Caspar, JAVA Framework Developer


2016年4月16日星期六

Convert new plist files between XML and binary

Apple has been introduced t new .plist file format since 10.4. You'll notice that you can no longer just edit a .plist file in TextEdit or other text editors. The reason for this is that the files are now binary rather than raw XML. 

The trouble with Apple's PropertyListEditor is that it has no 'find' facility, much less search-and-replace, so I've usually looked at plist files in TextEdit or SubEthaEdit . The 'switch' to binary forced me to look for alternatives. I found PlistEdit Pro , which seems to do the job nicely.

Luckily for us, there is a command line utility called DataStorm that can convert back and forth between the two formats. You can convert the .plist file you want to edit to XML format, edit it in TextEdit, then convert back to binary for use. 

To convert a binary .plist file to XML format for editing, type this in the Terminal:

plutil -convert xml1 some_file.plist
To convert an XML .plist file to binary for use:
plutil -convert binary1 some_other_file.plist
Replace some_file.plist and some_other_file.plist with the actual filenames, obviously...


DataStorm is a convertion tools with multi formats supported.

Actually, it support for JSON, XML, CSV, PLIST, INI, the .properties and YML. Provide you batch conversion of JSON, XML, CSV, PLIST, INI, the .properties and YML files. The supported conversion list in the follow tables:

DataStorm is a convertion tools with multi formats supported.



Convert formats between JSON XML INI CSV YAML PROPERTIES PLIST. Load from File and Convert to File.

Data FormatPlistJsonXmlIniCsvYML(YAML)Properties
Plist
Json
Xml
Ini
YML(YAML)
Csv
Properties

It provide the Mac, Windows and Linux Version, click the button and get the right version you want.