AppleScript & MP3 Files & ID3 Tags

Can i access the ID3 tags from AppleScript?

i know i can “tell application iTunes” to get the rating value. could i use “SystemEvents” or something similar to get to this?

i need to copy the iTunes ratings (which stores the values in the iTunes library itl file) for a song into the file’s ID3 tags, so the same ratings can be picked up in a separate XBMC music library (which uses the stored value in the ID3 POPM field of the MP3 file)

alternatively, how would this be possible with a cocoa-developed app? previously had a brief look at cocoa development, but not got far before or had any real use to learn, but this may change that!

hoping anyone can give me a helping hand here

cheers

jingo_man