Consolidating tags

I'm now using the discogs xml service to tag my mp3s, mainly because it's less likely to change as much as the normal web page.
However, one problem is that the credits are in multiple entries within the section.
Take for an example, entry 2 in discogs, which has the following credits:

Alexi Delano Producer, Written-By Cari Lekebusch Producer, Written-By

For both of these, the "role" is "Producer, Written-By", and I would like to put "Producer, Written-By: Alexi Delano, Cari Lekebusch" into the "Credits" field.

Under most scripting languages, I'd put the role into a variable, and append another variable with names until the role changed, at which point I'd append the text to the credits field. However, I'm not sure how I would do this in mp3tag.

Any ideas?

I could always post-process using perl but would rather do all my tagging in one place.