title: Getting at XML tree data in perl
body: <p>I need to parse an XML file using perl which I can load the file using the XML::Simple module but within the XML tree there is a tag that I can't see using the DataDumper module but I can see it's value instead.</p>
  
  <p></p>
  
  <pre><code>    &lt;testcase id="10"&gt;
          .
          .
          .
      &lt;/testcase&gt;
  </code></pre>
  
  <p>Above is a Sample of the XML file with the testcase tag. It's the  part that I have difficulty with. Using DataDumper to view the contents of the array I see something like this:</p>
  
  <pre><code>$VAR1 = {
            'testcases' =&gt; {
                           'file' =&gt; 'testcases.xml',
                           'testcase' =&gt; {
                                         '10' =&gt; {
                                                  },
  </code></pre>
  
  <p>Since the XML is defined like  why isn't it layed out in the VAR1 array with the id included? Instead of expecting testcases->testcase->id I get testcases->testcase->10. Which 10 is the id but what happened to the 'id' tag?</p>