my $xsd=XML::Compile::Schema->new(\@array); my $t= $xsd->template('TREE',$xsd->elements()); print LOG Dumper($t);