Skip to content
This repository has been archived by the owner. It is now read-only.
A property list (.plist) parser for Clojure
HTML Clojure
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.


Type Name Latest commit message Commit time
Failed to load latest commit information.


This is a Clojure library to parse the Property List (.plist) files that are ubiquitous on Mac OS X.

⚠️ Notice: This project is no longer maintained. It may have severe security or compatibility problems. Use it at your own risk!


Add the following to the dependency list in your project.clj:

[com.github.bdesham/clj-plist "0.10.0"]

See the Clojars page for instructions for Gradle and Maven.


The library has one public function, parse-plist, which takes as input a File, an InputStream, or a String naming a URI to read for the plist data. (parse-plist just passes its argument to clojure.xml/parse, so any source usable with that function will work with parse-plist.) The function returns a native Clojure data structure corresponding to the plist data, according to the following table:

plist tag Clojure equivalent
dateJoda DateTime object
dicthash map

Invocation example

(use 'com.github.bdesham.clj-plist)
(parse-plist ( "MyPropertyList.plist"))


Input plist file

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">
	<key>String example</key>
	<string>This is just some uninteresting text</string>
	<key>Array example</key>
	<key>Boolean example</key>
	<key>Date example</key>
	<key>Data example</key>

Parsed Clojure version

{"Array example" [2 3.14159],
 "Boolean example" true,
 "Data example" #<byte[] [B@3ea86d12>,
 "Date example" #<DateTime 1969-07-20T02:56:00.000-05:00>,
 "String example" "This is just some uninteresting text"}


The entire plist is sucked into memory at once, so there’s a relatively low limit on the size of the plist that can be loaded. (Trying to import my “iTunes Music Library.xml”, which is 16.2 MiB, causes a heap overflow on my system with the default Java memory limits.) Some sort of lazy loading would fix this.

Binary plist files are not supported (see issue 1). In the meantime, you can use plutil on OS X to convert binary plist files to XML plist files via /usr/bin/plutil -convert xml1 -o output.plist input.plist.


For more information on plist files, see the Apple man page for property list files.


This library was written by Benjamin Esham.

This project is hosted on GitHub. It is no longer being developed and is left on GitHub only in the hope that someone will find the code interesting or useful.

Version history

  • 0.10.0 (2016-01-15)
    • Allow the specification of a keyword-fn function to be applied to <key> elements (thanks Ben Cook!)
    • Add a test (thanks Marc O’Morain!)
    • Add support for CircleCI (thanks Marc O’Morain!)
    • Clojure 1.5 is now required.
  • 0.9.1 (2012-09-11)
    • Initial public release.


Copyright © 2012, 2016 Benjamin D. Esham. This project is distributed under the Eclipse Public License, the same as that used by Clojure. A copy of the license is included as “epl-v10.html” in this distribution.

You can’t perform that action at this time.