in reply to Perl Hash to XML

Recently, my attention was drawn to XML::Twig by other monks. I have been using it a lot since. I am pretty sure it can solve your problem. All you need to do is write a little logic around it. But there are more/many ways leading to Rome of course. I have no experience with XML:Writer. From a quick look at CPAN I think it is well possible to write XML files, I am not sure about the updating part though.

Replies are listed 'Best First'.
Re^2: Perl Hash to XML
by Bugz (Acolyte) on Aug 18, 2008 at 21:00 UTC
    you said XML twig allows it, but how?
    The idea is to check if there's a root and if there's a root, then add the child node to it and then the data nodes as child nodes to that node.

    How would i achieve this using Twig, i checked it's tutorial and my head's spinning faster than a top.

    I dun mind using XML::SIMPLE, XML::WRITER, XML::TWIG, XML::SMART, XML::DUMPER...anything that lets me create a XML file and then open it at a later instance to add another node.