in reply to config file generation

I don't fully understand your problem, you lost me at some point. But to give you something to chew on. I would assume that your config data could be stored in some form of hash. Design a sample hash that holds the data you think you will want to process. Thne use XML::simple to convert it into an XML file. Now you have an XML file designed specificly for your data and you can use XML::simple and one line of code to repopulate your hash. Something as simple as the following could generate your XML config file.
use XML::simple; my %data = { Ball=>blue,sky=>clear }; my $hashref=/%data; my $xml = XMLout($hashref []);