Parsing iTunes XML

I was wondering if there was any way to use PHP to parse the iTunes XML file into an array? I tried the scripts located at http://developer.apple.com/internet/opensource/php.html (in the "Parsing XML Files" section), but there was one major problem with them: If the script was told to look for "Title, Artist, Album, Genre" and a song was missing an "Album" tag, it would just move on and put the "Genre" info in for "Album."

Ultimately what I'm trying to do is have a PHP script that will parse the iTunes XML file and then insert it into a MySQL database. I've looked on the web at various resources, and none of them worked quite how I'd like.

Any help would be appreciated.

Dual 2.0GHz PowerMac G5 (PowerPC) Mac OS X (10.4.3) 1.5GB RAM

Posted on Dec 21, 2005 8:45 AM

Reply
3 replies

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Parsing iTunes XML

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.