If you want to do this in just a one-off way, then there's lots of good ways to deal with this quickly... MS Excel is one of the most intuitive data manipulation programs, you can be pretty creative with it to work out patterns with columns and search & replace, and fill-down.
Notepad, regular expressions (grep), or perl are a good place to start.
If this is something you want to do often from an online updated source, then you need to investigate not only perl, but specifically XSL... XSL is a language or applying styles or transforming XML documents... I've seen samples of XSL stylesheets that change a text file (once you've added <xml> to the beginning and </xml> to the end of the file) to just about any XML format you want.
I have an XSL plugin at
http://writtorrent.sf.net for Xlobby... you could use it to programatically apply an XSL (included are some RSS -> Xlobby DB XSL stylesheets that could help) with a click of a button in Xlobby.