[rrd-users] Dump and rebuild and restore XML with perl

Dave Wombat dave.wombat at gmail.com
Sat Mar 15 21:59:04 CET 2008

On Tue, Mar 11, 2008 at 3:03 PM, 0xception <0xception at gmail.com> wrote:
> I think i have found my own problem... but not a solution (other then
> starting all over with a new perl script)...

You are right, a new script is probably in order.

> I dont believe XML::Simple perl module can maintain the origional order of
> the XML it reads in... so i'll have to find another module or another way to
> rebuilding the XML file if i wasn to get around this. But just to add my
> opinion, i think it would make the tool more versitail if it was not
> dependend on the order of the XML.

But it can be a very simple script.  Don't parse the XML.  Just treat
it as text and
modify the text.  While I'd do it in perl, this is simple enough that
one or two passes
with sed may do everything you need.

More information about the rrd-users mailing list