Need to pull data out of XML file...

UlricT

Golden Member
Jul 21, 2002
1,966
0
0
I had moved a lot of my CD's onto my HDD (about 1500 songs), and it crashes :(. Some of these CDs have been given away to friends and stuff, so I need to pull out the info from my itunes library.xml file which I had copied onto another partition for some reason.

Anyone know of an easy way to read this in into Excel or something? Tried importing it already, but won't work.

/edit:
UPDATE: just put an example of how the file looks up!
The XML file is like this (with the exception that iI have taken repetitions out.... listed in the file):
 

kamper

Diamond Member
Mar 18, 2003
5,513
0
0
A little xslt could whip that into a csv format for you pretty quick I think. The problem would be writing the script, if someone here is proficient enough it would only take a minute (I'm not :().
 

WannaFly

Platinum Member
Jan 14, 2003
2,811
1
0
thats is a horribly formed "XML" document, i'd make the XSL file but it couldnt parse it, you'll probably need a custom script
 

UlricT

Golden Member
Jul 21, 2002
1,966
0
0
Thanks for the offer MrChad!

I just posted the part of the XML that I wanted to extract. The whole file is about 2.1MB. I am not on my computer right now, so I will send it to you when I get to my machine (in about 2.5 hours hopefully)
 

notfred

Lifer
Feb 12, 2001
38,241
4
0
That XML file already has an XSLT stylesheet attached to it. See where it mentions cdcatalog.xsl near the top?

Take the XML file, put it in the same directory as that xsl file, and then open the xml file in your browser. Let me know what you see.
 

UlricT

Golden Member
Jul 21, 2002
1,966
0
0
oh man... I forgot... that was my ineffective attempts at retrieving the data. Did not work, and I forgot to edit out that line. FIXED!
 

kamper

Diamond Member
Mar 18, 2003
5,513
0
0
Easy there mr bumphappy ;) What happened to MrChad writing the xsl for you? And maybe you could post what you've tried so far. It's generally easier for us to try and suggest improvements to that then to start from scratch.
 

MrChad

Lifer
Aug 22, 2001
13,507
3
81
Give this a shot. It should give you a tracklist. Give the output XML file an XLS extension and open it up in Excel.

 

UlricT

Golden Member
Jul 21, 2002
1,966
0
0
hey thanks MrChad... was away from my machine for a few days. gonna go check if it works.