l.frankline has asked for the wisdom of the Perl Monks concerning the following question:
Dear Monks,
I am able to print the xml file with pretty view option. It's working fine, but I am not able to write the output file into my disk.
I have searched the option in XML::Twig module, but I couldnt get it.
so far, I have tried the below code..
use XML::Twig; my $twig=XML::Twig->new(pretty_print=> 'indented'); $twig->parsefile( 'sample.xml'); $data = $twig-print; open OUT, ">" . "pretty.xml"; print OUT $data; close OUT; print "\nover\n";
Please give me your suggestions
Thanks
Frank
Don't put off till tomorrow, what you can do today.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: XML::Twig Question
by mirod (Canon) on Apr 22, 2006 at 07:01 UTC | |
|
Re: XML::Twig Question
by kvale (Monsignor) on Apr 22, 2006 at 06:38 UTC | |
|
Re: XML::Twig Question
by Samy_rio (Vicar) on Apr 22, 2006 at 06:56 UTC | |
|
Re: XML::Twig Question
by davido (Cardinal) on Apr 22, 2006 at 15:33 UTC |