Originally from http://support.apple.com/kb/HT1660
iTunes uses iTunes library files and your iTunes Media folder to organize and store your music and other media.
Your iTunes library files track the media you add to iTunes, how you’ve organized it, and other information such as playlists, play counts, and song ratings.
About the iTunes Library.itl file
The iTunes Library.itl file is a database of the songs in your library and the playlists that you’ve created. Some song-specific data is saved in this file. If you delete this file, iTunes creates a new, empty copy the next time that you open it. Your playlists, song ratings, comments, or other information is lost. The iTunes Library.itl file is used only by iTunes, and is the only one backed up by Time Machine on OS X.
New versions of iTunes sometimes include enhancements to the iTunes library. When you open a new version of iTunes, iTunes updates your existing library to the new format and places a copy of the old library in the Previous Libraries folder.
About the iTunes Library.xml file
The iTunes Library.xml file contains some, but not all, of the same information that’s stored in the iTunes Library.itl file. The purpose of the iTunes Library.xml file is to make your music and playlists available to other applications on your computer, such as iPhoto, Garageband, iMovie, and third-party software, in OS X Mountain Lion and earlier. These applications use this file to make it easier for you to add music from your iTunes library to your projects.
By default, iTunes 12.2 and later doesn’t create an iTunes Library.xml. If you’re using OS X Mountain Lion or earlier or a third-party app that uses the XML file, you need to enable Legacy library XML support:
- Open iTunes.
- From the menu bar at the top of your computer screen, choose iTunes > Preferences.
- Click the advanced tab.
- Select “Share iTunes Library XML with other applications.”
The iTunes Library.xml file is no longer used by the latest versions of Apple media applications on OS X Yosemite and later. Some third-party applications might still need it. Contact the software developer for more information.
If iTunes seems slow to open, try deselecting “Share iTunes Library XML with other applications.”