title: Convert XML file into another XML file using XSL template
body: <p>I want to convert an XML into another XML using an XSLT stylesheet.</p>
  
  <p>This is the part of my input XML where I have to use XSL template(input.xml):</p>
  
  <pre><code> ...
      &lt;extension&gt;
          &lt;og:image&gt;http://www.example.com/images/logos/logo-example-PNG.png&lt;/og:image&gt;
          &lt;og:type&gt;article&lt;/og:type&gt;
          &lt;resourceName&gt;http://www.example.com/big-data-search-managed-services-questions&lt;/resourceName&gt;
      &lt;/extension&gt;
     .......
  </code></pre>
  
  <p>I want my XML(output.xml) to look like this:</p>
  
  <pre><code>....
  &lt;MT N="og:image" V="http://www.example.com/images/logos/logo-example-PNG.png"/&gt;
  &lt;MT N="og:type" V="article"/&gt;
  &lt;MT N="resourceName" V="http://www.example.com/big-data-search-managed-services-questions"/&gt;
  ...
  </code></pre>
  
  <p>I am trying to use an XSLT for this. But I am stuck at the XSL template part. I want my XSLT to go in the XPATH of extension and specify a template for every element inside of the extension to convert into this form:</p>
  
  <pre><code>&lt;MT N="" V=""/&gt;
  </code></pre>
  
  <p>"N" with the name of the tag name and "V" with the value of the tag</p>
  
  <p>What should I specify in my XSLT?</p>
  
  <pre><code> &lt;xsl:template match="/extension"&gt;
      ....
      &lt;/xsl:template&gt;
  </code></pre>