<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">#######################################################
#I am using XML::DT as below (the require is for selective module loading):
#######################################################
#
#require XML::DT; XML::DT-&gt;import ();
# Yes !!!

use strict;

use Data::Dumper;
use XML::DT;

my @order=qw(volume issue doi author f_page l_page artid epub ppub type);

my $M;

my %handler = (
   '-default'   =&gt; sub {$c},
   'article' =&gt; sub {
#           $v{issue} = $dtattributes[1]-&gt;{number};
#           $v{volume} = $dtattributes[2]-&gt;{number};
           $v{issue}  = father("number");
           $v{volume} = gfather("number");

           $M .= join(" :\t", @v{(@order)}) . "\n";
    },
 );

 dt ("ex11.5.xml", %handler);
 print  $M;

__END__

&lt;main&gt;
&lt;volume number="27"&gt;
  &lt;issue number="7"&gt;
   &lt;article doi="10.1006/jmcc.1995.0129" artid="mc950129" f_page="1359" l_page="1367"
            type="xx" author="Juhani Knuuti, M." epub="" ppub="19950700" /&gt;
   &lt;article doi="10.1006/jmcc.1995.0130" artid="mc950130" f_page="1369" l_page="1381"
            type="xx" author="Cross, H.R." epub="" ppub="19950700" /&gt;
  &lt;/issue&gt;

  &lt;issue number="8"&gt;
    &lt;article doi="10.1006/jmcc.1995.0129" artid="mc950129" f_page="1359" l_page="1367"
            type="xx" author="Juhani Knuuti, M." epub="" ppub="19950700" /&gt;
    &lt;article doi="10.1006/jmcc.1995.0130" artid="mc950130" f_page="1369" l_page="1381"
            type="xx" author="Cross, H.R." epub="" ppub="19950700" /&gt;
&lt;/issue&gt;

</pre></body></html>