This week's book giveaway is in the OCAJP forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line! See this thread for details.
It's a non-trivial topic, meaning you have to write a parser yourself. You can get tools that will try to auto-generate a database out of XML, but often the logical structure is lost. For example, you might use database normalization for efficient storage of column data, but in the XML you want these tables denormalized so that a record contains all of its information.
In short, there's no magic solution since database don't necessarily have relationships easily discovered by a general purpose parser. Besides, writing a program that reads a database and outputs XML is good practice and this way you'll have 100% control over how the data is structured in the XML for easy customization. [ April 22, 2008: Message edited by: Scott Selikoff ]