|Perl: the Markov chain saw|
perl xml format questionby lukka1 (Initiate)
|on Jan 28, 2013 at 16:31 UTC||Need Help??|
lukka1 has asked for the
wisdom of the Perl Monks concerning the following question:
I need to read a few columns from a database table and write out the result in a specified xml format.
For e.g say the table (called SKU) has the following data
#ITEM, LOC--->column headers
I need this to be written out in the following xml-format in a file say sku.xml. Since i did not know how the xml-formatting would come out in this message, i enclosed the desired/actual xml-format within code tags (though this is not actually code)
I tried the following code to write this out in xml format. (since i am a newbie, i tried to search the perl monks/google repository and did a cut/paste of an example using modules like DBI; XML::Generator::DBI; XML::Handler::YAWriter; as follows. But this obviously gives me an output using the standard xml format (which is different from the desired output)
The actual output i get using the above script is as follows
Can you point out what i need to do to get the output in the desired xml format. Are there some easy ways to get this done? (e.g. some other modules i need to use which give output using an aliased xml output similar to the desired output)?
Thank you in advance