programming-examples/perl/SystemFunction/Using Data-Dumper to serialize the structure of a tree of XML document.pl
2019-11-15 12:59:38 +01:00

8 lines
184 B
Perl

use XML::Parser;
$parser = new XML::Parser( Style => 'Tree' );
my $tree = $parser->parsefile( shift @ARGV );
# serialize the structure
use Data::Dumper;
print Dumper( $tree );