Formatting XML output from a hashref

S

Sam

I have a hash ref of data that needs to be written out to an XML document.
Using a hashref to create an XML document can easily be done with
XML::Simple, but as the documentation states,
XML::Simple is able to present a simple API because it makes some
assumptions on your behalf. These include:

a.. You don't want fine-grained control of the formatting of generated XML
Unfortunatly, this is eactly what I want since all the attributes and values
are being put on the same line. While that way is perfectly valid XML syntax
and machine readable, it is not human readable.
Does anyone know of a way (another module perhaps) that I can use to insert
newlines and tabs into the document without post processing the xml?

Thank you.
 
R

Ron Savage

On Wed, 24 Aug 2005 04:43:33 +1000, Sam wrote:

Hi Sam

A recursive sub, altho tricky to write, would be the best way to process the
hash keys and to manage the formatting.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top