<xsl:template match="Employee">
<ArrayOfstringVariable
xmlns="http://schemas.abc.org/2004/07/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<xsl:for-each select="*">
<stringVariable>
<name>
<xsl:value-of select="name()"/>
</name>
<value>
<xsl:value-of select="."/>
</value>
</stringVariable>
</xsl:for-each>
</ArrayOfstringVariable>
</xsl:template>
On 19 November 2014 15:39, jaya k jayak_36@xxxxxxxxx
<xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:
> Hi All,
>
>
> I have below xml
>
> <?xml version="1.0" encoding="UTF-8"?>
> <Employee xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
> <FirstName>John</FirstName>
> <LastName>Peter</LastName>
> <Initial>T</Initial>
> </Employee>
>
> I want to write an xslt to output below xml from the xml above, can anyone
> help to me write this xslt?
>
> <?xml version="1.0" encoding="UTF-8"?>
> <ArrayOfstringVariable xmlns="http://schemas.abc.org/2004/07/"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> <stringVariable>
> <name>FirstName</name>
> <value>John</value>
> </stringVariable>
> <stringVariable>
> <name>LastName</name>
> <value>Peter</value>
> </stringVariable>
> <stringVariable>
> <name>Initial</name>
> <value>T</value>
> </stringVariable>
> </ArrayOfstringVariable>
> Thanks in advance
>
> XSL-List info and archive
> EasyUnsubscribe (by email)
--
Vasu Chakkera
NodeLogic Limited
Oxford
www.node-logic.com
==============
|