This thread may also be useful:
[Is DOpus right for me?:: user-generated collection xml)
It's a list of commands for adding files to collections and similar tasks.
Not that generating the XML files is a bad idea; I figured the commands might be useful though.
(If you do go the XML route, I think you may need to restart Opus to make it pick-up newly created collections but you can easily automate that if needed.)