title: parsing xml with same tags in perl
body: <p>How to parse the following xml fields using  XML::Simple in perl </p>
  
  <pre><code>&lt;SelectedSections&gt;
    &lt;Section Name="A_1" /&gt;
    &lt;Section Name="B_1" /&gt;
  &lt;/SelectedSections&gt;
  </code></pre>
  
  <p>so that I can have output as </p>
  
  <pre><code>A_1
  B_1
  </code></pre>
  
  <p>I tried something like this:</p>
  
  <pre><code>#!/usr/bin/perl
  use XML::Simple;
  use strict;
  use warnings;
  use Data::Dumper;
  
  my $xml = XML::Simple-&gt;new;
  my $file1 = 'testxml';
  my $data = $xml-&gt;XMLin($file1);
  print $data-&gt;{SelectedSections}-&gt;{Section-&gt; 'Name'} ,"\n";
  </code></pre>