programming-examples/perl/XML/Using XML_Simple to read and store the document.pl

7 lines
278 B
Perl
Raw Normal View History

2019-11-15 12:59:38 +01:00
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";