title: parsing xml file with xml::twig
body: <p>I have the following a large xml file which have entities on the below  format :
  could someone help how can i proccess it with xml::twig ?</p>
  
  <pre><code> &lt;root &gt;
        &lt;entity id="1" last_modified="2011-10-1"&gt;
          &lt;entity_title&gt; title&lt;/entity_title&gt;
          &lt;entity_description&gt;description  &lt;/entity_description&gt;
          &lt;entity_x&gt;  x &lt;/entity_x&gt;
          &lt;entity_y&gt;  x &lt;/entity_y&gt;
          &lt;entity_childs&gt;
            &lt;child flag="1"&gt;
              &lt;child_name&gt;name&lt;child_name&gt;
              &lt;child_type&gt;type1&lt;/child_type&gt;
              &lt;child_x&gt; some_text&lt;/child__x&gt;
            &lt;/child&gt;
            &lt;child flag="1"&gt;
              &lt;child_name&gt;name1&lt;child_name&gt;
              &lt;child_type&gt;type2&lt;/child_type&gt;
              &lt;child_x&gt; some_text&lt;/child__x&gt;
            &lt;/child&gt;
           &lt;entity_sibling&gt;
            &lt;family value="1" name="xc"&gt;fed&lt;/ext_ref&gt;
            &lt;family value="1" name="df"&gt;ff&lt;/ext_ref&gt; 
           &lt;/entity_sibling&gt;
      &lt;\root&gt;
  
  
   ;
  </code></pre>
  
  <p>I run the below code and get out of memory !</p>
  
  <pre><code>my $file = shift ||die $!;
  
  my $twig = XML::Twig-&gt;new();
  
  my $config = $twig-&gt;parsefile( $file )-&gt;simplify();
  
  print Dumper( $config );
  </code></pre>