Note: This works with FireFox. It may or may not work with other browsers.

Following these steps, you can produce a web page from any iTunes library or playlist, for easy sharing and viewing. The web page will include links to the iTunes store automatically.
  1. Download the following files from this site. Save them all to the same folder. Remember where you saved them. Or download the whole set bundled as a zip file.

    formatLibrary.xml
    formatLibrary.xsl
    formatPlaylist.xml
    iTunesLibrary.xsd
    transformLibrary.xml
    transformLibrary.xsl

  2. Copy your iTunes library or export an iTunes playlist to a file labeled "iTunes.xml" in the same folder where you put the files from step 1.

  3. In your browser (see note at the beginning), using the "File->Open File..." menu, load the file "transformLibrary.xml" from the folder where you saved everything. This may take some time if you do it with your entire library. This will load a page that looks sort of like junk. Don't worry about what it looks like.

  4. Right click on this page to save it. Save it with Format set to "Web Page, complete". Make sure to change the name to "library.xml". This is the file name the next step expects. Save to the same directory with the other files.

  5. Now, in your browser, load either "formatLibrary.xml" or "formatPlaylist.xml" (depending on whether you used the whole library or an individual playlist earlier in the first stage). Voila, after some processing, you should have a reasonably nice looking web page, complete with links to the iTunes store. NB: This can take a long time depending on the speed of your machine and the size of the library or playlist.

  6. If you want to, save this page. Name it whatever you want, but change the suffix to ".html". This will be a complete web page, so you can simply reopen it (using "File->Open File..."), attach it to an e-mail for someone else to use, and so on.
Here is an example of the results.