title: perl script to read xml file and create a property file
body: <p>Perl script to read property.xml and create install.properties file </p>
  
  <p>how to read multiple lines and split keyName and keyValue</p>
  
  <pre><code>#!/usr/bin/perl
  use strict;
  use warnings;
  
  open my $fh, '&lt;', "property.xml"  or die "property.xml: $!";
  open(CTS,"&gt;install.properties") or die $!;
  
  while ( my $line = &lt;$fh&gt; ) {
  
  if ($line =~ m/\&lt;entry.*\&lt;\/entry\&gt;$/i ){     # how to read multiple line
  my ($keyName, $keyValue) = split(//, $line);     # how to split 
  print CTS $keyName = $keyValue;
  }
  }
  </code></pre>
  
  <p>property.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8" standalone="no"?&gt;
  &lt;!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"&gt;
  &lt;properties&gt;
      &lt;entry key="TYPE"&gt;
      Rel
      &lt;/entry&gt;
      &lt;!-- tst  --&gt;
      &lt;entry key="LOCATION"&gt;
      C:/Rel-LOCATION
      &lt;/entry&gt;
      &lt;entry key="HOST"&gt;
      localhost
      &lt;/entry&gt;    
  &lt;/properties&gt;
  </code></pre>
  
  <p>install.properties</p>
  
  <pre><code>TYPE = Rel
  LOCATION = C:/Rel-LOCATION
  HOST = localhost
  </code></pre>