• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 315
  • Last Modified:

xml xsl

how to convert this xml into xsl?

<object class="west.ma.dom.physician.Physician">
      <void property="AMANumber">
            <string>04815940810</string>
      </void>
      <void property="Active">
            <boolean>true</boolean>
      </void>
</object>


Please reply me asap
0
gdv82
Asked:
gdv82
1 Solution
 
r_m_shyamCommented:
Hi gdv82,

You can not convert an XML into an XSL.

XSL is an transformation language that is used to transform the XML content into som other format like HTML,PDF, or another XML.

for example if you want to transform your above XML into HTML, you should use the following XSL code.

<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0">
    <xsl:output method="html" encoding="ISO-8859-1" indent="no" />
  <xsl:template match="/">
     <html>
       <head></head>
       <body>
           <table>
            <xsl:for-each select="object/void">
              <tr>
                 <td><xsl:value-of select="@property"</td>
              </tr>
              <tr>
                 <td><xsl:value-of select="."</td>
              </tr>
            </xsl:for-each>
           </table>
       </body>
     </html>
  </xsl:template>
</xsl:stylesheet>

This should help you.

Regards - Shyam
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now