in reply to How to assign xml content to a variable using XML::Twig module

update: I have posted the previous reply. Sorry for the duplicate post.

First, What is the need for storing the same xml file content after parsing, in to another variable?. Is it for Post processing the Xml part as ordinary text?

I have the below answer upto what i have understood from ur question above.

use XML::Twig; my $twig=new XML::Twig; $twig->parsefile($ARGV[0]); $ARGV[0] is input xml file. $a=$twig->sprint; ##### storing the xml content into a variable. print $a;

Please forgive me for my english.

------Murugesan---------

  • Comment on Re: How to assign xml content to a variable using XML::Twig module
  • Download Code