premrajani Posted June 26, 2013 Share Posted June 26, 2013 Hi, Using Web API, I retrive data from a tool in format given below. This is done using a built-in API methods of the tool. <Record><Field id="6233" type="1">APAC - Hong Kong</Field><Record> Now my problem is using XSLT is it possible to change the format to below shown format and how. I'm still learning and finding it tough to achieve it. <Record><Field id="6233" type="1" value="APAC - Hong Kong"></Field><Record> Link to comment Share on other sites More sharing options...
Martin Honnen Posted June 26, 2013 Share Posted June 26, 2013 Put the two templates <xsl:template match="@* | node()"> <xsl:copy> <xsl:apply-templates select="@* | node()"/> </xsl:copy></xsl:template> <xsl:template match="Field/text()"> <xsl:attribute name="value"> <xsl:value-of select="."/> </xsl:attribute></xsl:template> into a stylesheet and it should work. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now