Using XML:Simple to read and store the document : SAX « XML « Perl






Using XML:Simple to read and store the document

  
use XML::Simple;

my $simple = XML::Simple->new();             # initialize the object
my $tree = $simple->XMLin( './data.xml' );   # read, store document

print "The user prefers the font " . $tree->{ font }->{ name } . " at " . $tree->{ font }->{ size } . " points.\n";
  
    
  








Related examples in the same category

1.Check error in SAX parser
2.Check node name in SAX paser
3.Register handlers to SAX parser
4.SAX parser handler
5.Converting a comma separated list data source to XML
6.Stream XML::Parser
7.The XML::Parser module provides a framework for parsing XML.
8.Using XML::Parser to parse xml file
9.XML::Parasr style: Tree