title: Converting XML file to another XML file using XSLT
body: <p>XML file 1:</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;rentalProperties&gt;
      &lt;property contact ="1"&gt;
          &lt;type&gt;House &lt;/type&gt;
          &lt;price&gt;420&lt;/price&gt;
          &lt;address&gt;
              &lt;streetNo&gt;1&lt;/streetNo&gt;
              &lt;street&gt;Wavell Street&lt;/street&gt;
              &lt;suburb&gt;Box Hill&lt;/suburb&gt;
              &lt;state&gt;VIC&lt;/state&gt;
              &lt;zipcode&gt;3128&lt;/zipcode&gt; 
          &lt;/address&gt;
          &lt;numberOfBedrooms&gt;3&lt;/numberOfBedrooms&gt;
          &lt;numberOfBathrooms&gt;1&lt;/numberOfBathrooms&gt; 
          &lt;garage&gt;1&lt;/garage&gt;   
      &lt;/property&gt;
  </code></pre>
  
  <p>XML file 2:</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;rentalProperties&gt;
      &lt;property contact ="1"&gt;
          &lt;type&gt;House &lt;/type&gt;
          &lt;price&gt;420&lt;/price&gt;
          &lt;address&gt;1 wavell street,Box Hill,VIC,Australia&lt;/address&gt;
          &lt;numberOfBedrooms&gt;3&lt;/numberOfBedrooms&gt;
          &lt;numberOfBathrooms&gt;1&lt;/numberOfBathrooms&gt; 
          &lt;garage&gt;1&lt;/garage&gt;     
      &lt;/property&gt;
  </code></pre>
  
  <p>How should i convert xml file 1 to xml fle 2 using xslt?
  i want to represent the address as the single line and add a new attribute [country- Australia] to end of the line. i did the rest of it . i'm struggling with address line</p>
  
  <p>XSLT file:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="iso-8859-1"?&gt;
  &lt;xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" type="text/css" href="style.css"&gt;
      &lt;xsl:template match="/"&gt;
          &lt;rentalProperties&gt;
              &lt;property&gt;
                  &lt;xsl:attribute name="contact"&gt;&lt;xsl:value-of select='@contact'/&gt;&lt;/xsl:attribute&gt;    
                  &lt;type&gt;&lt;xsl:value-of select="type"/&gt;&lt;/type&gt;
                  &lt;price&gt;&lt;xsl:value-of select="price"/&gt;&lt;/price&gt;
                  &lt;numberOfBedrooms&gt;&lt;xsl:value-of select="numberOfBedrooms"/&gt;&lt;/numberOfBedrooms&gt;
                  &lt;numberOfBathrooms&gt;&lt;xsl:value-of select="numberOfBathrooms"/&gt;&lt;/numberOfBathrooms&gt;
                  &lt;garage&gt;&lt;xsl:value-of select="garage"/&gt;&lt;/garage&gt;    
              &lt;/property&gt;    
          &lt;/rentalProperties&gt;    
      &lt;/xsl:template&gt;
  &lt;/xsl:stylesheet&gt;
  </code></pre>