I'm working on something like that at this moment. I've created NLGrabXMLTV, a grabber for the Netherlands. A lot of coding for that program can be used for an xmltv filter program, so I'm giving it a try. I don't know when I'm finished though .
Basicly the program gets an xmltv as input and filters out the channels you don't want (using a config.xml), renaming (channel id) and sorting the channels to an output xmltv file.
i5 750 4GB RAM, W7 Home Premium 64 bit, Digital Devices Cine CT V6 dual DVB-C, KNC One DVB-C, Newcs 1.66 on a NSLU2 with a Smargo Smartreader+, Egreat M34A, Popcorn Hour A-100.