#!/usr/bin/perl -- use strict; use warnings; use XML::Twig; my $xml = <<'__XML__'; 1 QWERTY D:/Book1.xls bata 2 PANAMA C:/test.doc vata __XML__ my $t= XML::Twig->new(); $t->parse($xml); my $root= $t->root; my @para= $root->children(); # get the root's children foreach my $para (@para) { for my $pan( $para->children ){ print $pan->text, "\n"; } print $para->_dump(), "\n"; } __END__