<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: PHP parser for OS X plist XML files</title>
	<atom:link href="http://www.jeremyjohnstone.com/blog/2008-10-26-php-parser-for-os-x-plist-xml-files.html/feed" rel="self" type="application/rss+xml" />
	<link>http://www.jeremyjohnstone.com/blog/2008-10-26-php-parser-for-os-x-plist-xml-files.html</link>
	<description>Ramblings of a Geek</description>
	<lastBuildDate>Mon, 14 Dec 2009 18:56:37 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Vitaliy Yanchuk</title>
		<link>http://www.jeremyjohnstone.com/blog/2008-10-26-php-parser-for-os-x-plist-xml-files.html/comment-page-1#comment-164</link>
		<dc:creator>Vitaliy Yanchuk</dc:creator>
		<pubDate>Wed, 11 Nov 2009 01:21:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.jeremyjohnstone.com/blog/?p=384#comment-164</guid>
		<description>There is some plistParser with Adium plist files, i want to create site-smiles sysem based on adium smile-sets
Try to parse plist from this set(http://www.adiumxtras.com/index.php?a=xtras&amp;xtra_id=4207), it will crash with error:

Fatal error:  Uncaught exception &#039;Exception&#039; with message &#039;Not a valid plist. key is not a valid type&#039;</description>
		<content:encoded><![CDATA[<p>There is some plistParser with Adium plist files, i want to create site-smiles sysem based on adium smile-sets<br />
Try to parse plist from this set(http://www.adiumxtras.com/index.php?a=xtras&amp;xtra_id=4207), it will crash with error:</p>
<p>Fatal error:  Uncaught exception &#8216;Exception&#8217; with message &#8216;Not a valid plist. key is not a valid type&#8217;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonty</title>
		<link>http://www.jeremyjohnstone.com/blog/2008-10-26-php-parser-for-os-x-plist-xml-files.html/comment-page-1#comment-154</link>
		<dc:creator>Jonty</dc:creator>
		<pubDate>Sat, 05 Sep 2009 15:55:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.jeremyjohnstone.com/blog/?p=384#comment-154</guid>
		<description>Thanks for this, you saved me an hour of dullness! Just forked and pushed back a small changeset to allow parsing of strings as well as files, hope it&#039;s useful to someone else.</description>
		<content:encoded><![CDATA[<p>Thanks for this, you saved me an hour of dullness! Just forked and pushed back a small changeset to allow parsing of strings as well as files, hope it&#8217;s useful to someone else.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: CFPropertyList</title>
		<link>http://www.jeremyjohnstone.com/blog/2008-10-26-php-parser-for-os-x-plist-xml-files.html/comment-page-1#comment-141</link>
		<dc:creator>CFPropertyList</dc:creator>
		<pubDate>Tue, 19 May 2009 14:46:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.jeremyjohnstone.com/blog/?p=384#comment-141</guid>
		<description>&quot;The PHP implementation of Apple&#039;s PropertyList can handle XML PropertyLists as well as binary PropertyLists. It offers functionality to easily convert data between worlds, e.g. recalculating timestamps from unix epoch to apple epoch and vice versa. A feature to automagically create (guess) the plist structure from a normal PHP data structure will help you dump your data to plist in no time.&quot;</description>
		<content:encoded><![CDATA[<p>&#8220;The PHP implementation of Apple&#8217;s PropertyList can handle XML PropertyLists as well as binary PropertyLists. It offers functionality to easily convert data between worlds, e.g. recalculating timestamps from unix epoch to apple epoch and vice versa. A feature to automagically create (guess) the plist structure from a normal PHP data structure will help you dump your data to plist in no time.&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rodney Rehm</title>
		<link>http://www.jeremyjohnstone.com/blog/2008-10-26-php-parser-for-os-x-plist-xml-files.html/comment-page-1#comment-140</link>
		<dc:creator>Rodney Rehm</dc:creator>
		<pubDate>Tue, 19 May 2009 11:30:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.jeremyjohnstone.com/blog/?p=384#comment-140</guid>
		<description>PLists come either in XML or binary format. The parser written by Jeremy only works with the XML based PLists. Besides that, i could only find functionality for reading XML PLists.

In my projects I needed some more power, especially when it came to creating PLists. So i wrote a little tool called CFPropertyList, which in fact was just a logic wrapper around PHP&#039;s DOM. To simplify things in daily business, i also added functionality for guessing the PList structure from native PHP data structures. A friend of mine ported Apple&#039;s CFBinaryPList to PHP, adding the result to CFPropertyList. So now we&#039;ve got a fairly simple API to use Apple&#039;s PropertyLists (XML and binary) in PHP. Reading, writing, creating, manipulating - everything you need.

The tool was just launched this morning. Check it out at http://code.google.com/p/cfpropertylist/</description>
		<content:encoded><![CDATA[<p>PLists come either in XML or binary format. The parser written by Jeremy only works with the XML based PLists. Besides that, i could only find functionality for reading XML PLists.</p>
<p>In my projects I needed some more power, especially when it came to creating PLists. So i wrote a little tool called CFPropertyList, which in fact was just a logic wrapper around PHP&#8217;s DOM. To simplify things in daily business, i also added functionality for guessing the PList structure from native PHP data structures. A friend of mine ported Apple&#8217;s CFBinaryPList to PHP, adding the result to CFPropertyList. So now we&#8217;ve got a fairly simple API to use Apple&#8217;s PropertyLists (XML and binary) in PHP. Reading, writing, creating, manipulating &#8211; everything you need.</p>
<p>The tool was just launched this morning. Check it out at <a href="http://code.google.com/p/cfpropertylist/" rel="nofollow">http://code.google.com/p/cfpropertylist/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: drunknbass</title>
		<link>http://www.jeremyjohnstone.com/blog/2008-10-26-php-parser-for-os-x-plist-xml-files.html/comment-page-1#comment-123</link>
		<dc:creator>drunknbass</dc:creator>
		<pubDate>Fri, 13 Mar 2009 19:13:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.jeremyjohnstone.com/blog/?p=384#comment-123</guid>
		<description>this doesnt seem to follow arrays at all. if i have a dict-&gt;array-&gt;10dicts it fails but if i have dict-&gt;array-&gt;1dict it works.</description>
		<content:encoded><![CDATA[<p>this doesnt seem to follow arrays at all. if i have a dict-&gt;array-&gt;10dicts it fails but if i have dict-&gt;array-&gt;1dict it works.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: AndreyP</title>
		<link>http://www.jeremyjohnstone.com/blog/2008-10-26-php-parser-for-os-x-plist-xml-files.html/comment-page-1#comment-133</link>
		<dc:creator>AndreyP</dc:creator>
		<pubDate>Thu, 05 Mar 2009 22:29:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.jeremyjohnstone.com/blog/?p=384#comment-133</guid>
		<description>This is a bug in parse_array function. I think your problem, Gurpartap Singh, should be resolved by moving line 99 and 100 in original code to line 98 and 99 accordingly (i mean above &quot;do&quot;). Thx.</description>
		<content:encoded><![CDATA[<p>This is a bug in parse_array function. I think your problem, Gurpartap Singh, should be resolved by moving line 99 and 100 in original code to line 98 and 99 accordingly (i mean above &#8220;do&#8221;). Thx.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ST</title>
		<link>http://www.jeremyjohnstone.com/blog/2008-10-26-php-parser-for-os-x-plist-xml-files.html/comment-page-1#comment-129</link>
		<dc:creator>ST</dc:creator>
		<pubDate>Thu, 19 Feb 2009 07:21:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.jeremyjohnstone.com/blog/?p=384#comment-129</guid>
		<description>Just to clarify (using your example) you would do the above as follows (this assumes you have made a COPY of the plist file and put it on your desktop. Don&#039;t do this to the original plist file as it will be made unreadable to Safari (though you can easily convert it back to the correct binary format:

plutil -convert xml1 ~/Desktop/com.apple.Safari.plist</description>
		<content:encoded><![CDATA[<p>Just to clarify (using your example) you would do the above as follows (this assumes you have made a COPY of the plist file and put it on your desktop. Don&#8217;t do this to the original plist file as it will be made unreadable to Safari (though you can easily convert it back to the correct binary format:</p>
<p>plutil -convert xml1 ~/Desktop/com.apple.Safari.plist</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ST</title>
		<link>http://www.jeremyjohnstone.com/blog/2008-10-26-php-parser-for-os-x-plist-xml-files.html/comment-page-1#comment-126</link>
		<dc:creator>ST</dc:creator>
		<pubDate>Thu, 19 Feb 2009 07:19:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.jeremyjohnstone.com/blog/?p=384#comment-126</guid>
		<description>Tom those plist files are in a binary format. This app (seems... I haven&#039;t actually used it) to work on XML formatted plist files only.

If you want to convert a binary plist into xml do this from terminal (using the correct path for your case):
plutil -convert xml1 /Users/tomshaw/Desktop/Bookmarks.plist

Don&#039;t know if the converted file will work with this script but you can give it a shot.</description>
		<content:encoded><![CDATA[<p>Tom those plist files are in a binary format. This app (seems&#8230; I haven&#8217;t actually used it) to work on XML formatted plist files only.</p>
<p>If you want to convert a binary plist into xml do this from terminal (using the correct path for your case):<br />
plutil -convert xml1 /Users/tomshaw/Desktop/Bookmarks.plist</p>
<p>Don&#8217;t know if the converted file will work with this script but you can give it a shot.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tom Shaw</title>
		<link>http://www.jeremyjohnstone.com/blog/2008-10-26-php-parser-for-os-x-plist-xml-files.html/comment-page-1#comment-128</link>
		<dc:creator>Tom Shaw</dc:creator>
		<pubDate>Mon, 22 Dec 2008 23:51:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.jeremyjohnstone.com/blog/?p=384#comment-128</guid>
		<description>Nice but I can&#039;t get it to read ~/Library/Preferences/com.apple.Safari.plist or ~/Library/Preferences/org.mozilla.firefox.plist  Any ideas?</description>
		<content:encoded><![CDATA[<p>Nice but I can&#8217;t get it to read ~/Library/Preferences/com.apple.Safari.plist or ~/Library/Preferences/org.mozilla.firefox.plist  Any ideas?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jim</title>
		<link>http://www.jeremyjohnstone.com/blog/2008-10-26-php-parser-for-os-x-plist-xml-files.html/comment-page-1#comment-127</link>
		<dc:creator>Jim</dc:creator>
		<pubDate>Thu, 11 Dec 2008 08:02:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.jeremyjohnstone.com/blog/?p=384#comment-127</guid>
		<description>If you aren&#039;t set on writing your own thing to do this particular task (parsing the iTunes xml file), and you&#039;re okay using tools Apple provides, look up the man page for PlistBuddy(8).  iTunes comes with its own copy of the utility:

/Library/Receipts/iTunesX.pkg/Contents/Resources/PlistBuddy

It&#039;s also at /usr/libexec/PlistBuddy.

The command:
PlistBuddy -c print iTunes\ Music\ Library.xml

...will print every entry in the xml (aka plist) file.  There are also commands for adding, deleting, copying, importing, merging, and modifying entries to the same file.  You could conceivably wrap php around calls to PlistBuddy (e.g., for a web-driven interface); stuff like that makes me cringe but if it works for you that&#039;s all that matters. :)

Don&#039;t know if it outputs in a format that you can use but it looks easier to deal with than the original xml.

Keep in mind though that the XML file is never used by iTunes unless the user explicitly tells iTunes to import from it.  The XML file is just a way for other programs to get at iTunes&#039; data without needing to parse the actual library file (the format of which seems to change with every new release of iTunes).</description>
		<content:encoded><![CDATA[<p>If you aren&#8217;t set on writing your own thing to do this particular task (parsing the iTunes xml file), and you&#8217;re okay using tools Apple provides, look up the man page for PlistBuddy(8).  iTunes comes with its own copy of the utility:</p>
<p>/Library/Receipts/iTunesX.pkg/Contents/Resources/PlistBuddy</p>
<p>It&#8217;s also at /usr/libexec/PlistBuddy.</p>
<p>The command:<br />
PlistBuddy -c print iTunes\ Music\ Library.xml</p>
<p>&#8230;will print every entry in the xml (aka plist) file.  There are also commands for adding, deleting, copying, importing, merging, and modifying entries to the same file.  You could conceivably wrap php around calls to PlistBuddy (e.g., for a web-driven interface); stuff like that makes me cringe but if it works for you that&#8217;s all that matters. <img src='http://www.jeremyjohnstone.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Don&#8217;t know if it outputs in a format that you can use but it looks easier to deal with than the original xml.</p>
<p>Keep in mind though that the XML file is never used by iTunes unless the user explicitly tells iTunes to import from it.  The XML file is just a way for other programs to get at iTunes&#8217; data without needing to parse the actual library file (the format of which seems to change with every new release of iTunes).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gurpartap Singh</title>
		<link>http://www.jeremyjohnstone.com/blog/2008-10-26-php-parser-for-os-x-plist-xml-files.html/comment-page-1#comment-130</link>
		<dc:creator>Gurpartap Singh</dc:creator>
		<pubDate>Wed, 03 Dec 2008 07:14:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.jeremyjohnstone.com/blog/?p=384#comment-130</guid>
		<description>I am unable to parse plist file in http://www.adiumxtras.com/index.php?a=xtras&amp;xtra_id=1431 others such.

The reported error is: &#039;Not a valid plist. key is not a valid type&#039;.</description>
		<content:encoded><![CDATA[<p>I am unable to parse plist file in <a href="http://www.adiumxtras.com/index.php?a=xtras&amp;xtra_id=1431" rel="nofollow">http://www.adiumxtras.com/index.php?a=xtras&amp;xtra_id=1431</a> others such.</p>
<p>The reported error is: &#8216;Not a valid plist. key is not a valid type&#8217;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeremy Johnstone&#8217;s Blog: PHP parser for OS X plist XML files : Dragonfly Networks</title>
		<link>http://www.jeremyjohnstone.com/blog/2008-10-26-php-parser-for-os-x-plist-xml-files.html/comment-page-1#comment-125</link>
		<dc:creator>Jeremy Johnstone&#8217;s Blog: PHP parser for OS X plist XML files : Dragonfly Networks</dc:creator>
		<pubDate>Tue, 28 Oct 2008 10:33:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.jeremyjohnstone.com/blog/?p=384#comment-125</guid>
		<description>[...] Johnstone has come up with a simple plist xml parser. The plist format is what iTunes (and some other application) uses for its library [...]</description>
		<content:encoded><![CDATA[<p>[...] Johnstone has come up with a simple plist xml parser. The plist format is what iTunes (and some other application) uses for its library [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeremy Johnstone&#8217;s Blog: PHP parser for OS X plist XML files : WebNetiques</title>
		<link>http://www.jeremyjohnstone.com/blog/2008-10-26-php-parser-for-os-x-plist-xml-files.html/comment-page-1#comment-124</link>
		<dc:creator>Jeremy Johnstone&#8217;s Blog: PHP parser for OS X plist XML files : WebNetiques</dc:creator>
		<pubDate>Tue, 28 Oct 2008 09:40:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.jeremyjohnstone.com/blog/?p=384#comment-124</guid>
		<description>[...] Johnstone has come up with a simple plist xml parser. The plist format is what iTunes (and some other application) uses for its library [...]</description>
		<content:encoded><![CDATA[<p>[...] Johnstone has come up with a simple plist xml parser. The plist format is what iTunes (and some other application) uses for its library [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tony Landis</title>
		<link>http://www.jeremyjohnstone.com/blog/2008-10-26-php-parser-for-os-x-plist-xml-files.html/comment-page-1#comment-132</link>
		<dc:creator>Tony Landis</dc:creator>
		<pubDate>Mon, 27 Oct 2008 17:04:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.jeremyjohnstone.com/blog/?p=384#comment-132</guid>
		<description>Thanks, this will be useful for me</description>
		<content:encoded><![CDATA[<p>Thanks, this will be useful for me</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan Kennedy</title>
		<link>http://www.jeremyjohnstone.com/blog/2008-10-26-php-parser-for-os-x-plist-xml-files.html/comment-page-1#comment-131</link>
		<dc:creator>Ryan Kennedy</dc:creator>
		<pubDate>Mon, 27 Oct 2008 04:56:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.jeremyjohnstone.com/blog/?p=384#comment-131</guid>
		<description>Nice, this should help with dumps from Delicious Library as well. The XML export uses plist as well.</description>
		<content:encoded><![CDATA[<p>Nice, this should help with dumps from Delicious Library as well. The XML export uses plist as well.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
