title: Perl functions to find nodes and get child nodes in ActivePerl
body: <p></p>
  
  <p>I have a Perl program to parse an input XML file and print values to an output text file.</p>
  
  <p>It seems to work fine when I build with the DWIM Perl GUI, but when I build the same with ActivePerl it fails due to missing libraries. </p>
  
  <p>Can someone help me converting the code to the ActivePerl equivalent?</p>
  
  <p>The Perl code is</p>
  
  <pre class="lang-perl prettyprint-override"><code>use strict;
  use warnings;
  
  use XML::LibXML;
  
  open( my $File, '&gt;', 'options.txt' );
  
  my $filename = $ARGV[0];
  
  my $parser = XML::LibXML-&gt;new();
  my $xmldoc = $parser-&gt;parse_file( $filename );
  
  for my $sample ( $xmldoc-&gt;findnodes( '/Releases/Release' ) ) {
  
      foreach my $child ( $sample-&gt;getChildnodes ) {
  
          if ( $child-&gt;nodeType() == XML_ELEMENT_NODE ) {
              print $File $child-&gt;textContent(), " ";
          }
      }
  
      print $File "\n";
  }
  </code></pre>
  
  <p>My Input would be like (in XML)</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;!-- Pre-Seed File for Script Generation --&gt;
  &lt;Releases&gt;
    &lt;Release&gt;
      &lt;Family&gt;F1L&lt;/Family&gt;
      &lt;ArVersion&gt;3.2.2&lt;/ArVersion&gt;
      &lt;ReleaseVersion&gt;C3.03.10.001&lt;/ReleaseVersion&gt;
      &lt;PackageType&gt;FULL&lt;/PackageType&gt;
    &lt;/Release&gt;
    &lt;Release&gt;
      &lt;Family&gt;F1H&lt;/Family&gt;
      &lt;ArVersion&gt;4.0.3&lt;/ArVersion&gt;
      &lt;ReleaseVersion&gt;Ver4.03.20&lt;/ReleaseVersion&gt;
      &lt;PackageType&gt;SPAL&lt;/PackageType&gt;
    &lt;/Release&gt;
  &lt;/Releases&gt;
  </code></pre>
  
  <p>The output should be </p>
  
  <pre class="lang-none prettyprint-override"><code>F1L 3.2.2 C3.03.10.001 FULL 
  F1H 4.0.3 Ver4.03.20 SPAL 
  </code></pre>