You are here:  » Show just the imagetags


Show just the imagetags

Submitted by sahertian on Wed, 2008-10-08 08:46 in

Hello David,

I want to construct artist-data, but this xml file give only 2 entries per record in the demo. Can you give me a clue?

http://ws.audioscrobbler.com/2.0/?method=artist.gettopalbums&artist=cher&api_key=b25b959554ed76058ac220b7b2e0a026

thanks,
Ron

Submitted by support on Wed, 2008-10-08 09:41

Hello Ron,

This is because since there are more image tags than album tags, the parser thinks they are the main records.

To overcome this, you simply need to use the correct Format String, rather than rely on the autodetection.

The correct format string for the album records is:

xml|LFM/TOPALBUMS/ALBUM/

You can see your XML in the demo using this Format String by clicking here.

If you then use the "Generate PHP Source Code" function, you will see how to specify this format string in your code!

Hope this helps!
Cheers,
David.

Submitted by sahertian on Wed, 2008-10-08 09:46

Thanks, David!