Simple removeChild test, although the xml line is removed, it maintains an empty blank row, how come? Btw - my source xml file does have indents, however even when I remove them I get the same result. So what's the point of being able to removeChild row if it still retains a blank space?
Is there a way to re-format the resulting xml lines prior to outputing it to the file?
foreach my $XYZ ($doc->findnodes("//EE1"))
{
 my $library = $XYZ->parentNode;
 $library->removeChild($XYZ);
} 
print {$FH} $doc->toString(0);
RESULT IN OUTPUT FILE:
<?xml version="1.0"?>
<TopTag>
  <AA1>ZNY</AA1>
  <AA2>111</AA2>
  <BB1>
    <CC1>ZNY</CC1>
    <CC2>
      <DD1>
                     <-----blank line remains
        <EE2>2000</EE2>
      </DD1>
      <DD1>
                     <-----blank line remains
        <EE2>5000</EE2>
      </DD1>
    </CC2>
  </BB1>
  <AA1>ZNY2</AA1>
  <AA2>2</AA2>
</TopTag>
 
     
     
     
    