how can i convert the following XML
__________________________________________________
<?xml version="1.0" encoding="UTF-8"?>
<object type="company" action="C">
<property name="howmanynumbers" action="Create">
<value>1</value>
<value>2</value>
<value>3</value>
</property>
<property name="howmanynumbers" action="Delete">
<value>a</value>
<value>b</value>
<value>c</value>
</property>
<property name="numbers" action="Update">
<value>123456</value>
<value>234567</value>
</property>
</object>
__________________________________________________ ______
when iam using the XSLT i prepared something like this
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:template match = "/">
<xsl:element name="Header">
<xsl:apply-templates/>
</xsl:element>
</xsl:template>
<xsl:template match ="object">
<xsl:text disable-output-escaping="yes"><</xsl:text>
<xsl:value-of select="@type"/>
<xsl:text disable-output-escaping="yes">></xsl:text>
<xsl:element name="action">
<xsl:value-of select="@action"/>
</xsl:element>
<xsl:apply-templates select = "property" />
<xsl:apply-templates select = "object" />
<xsl:text disable-output-escaping="yes"></</xsl:text>
<xsl:value-of select ="@type"/>
<xsl:text disable-output-escaping="yes">></xsl:text>
</xsl:template>
<xsl:template match = "property">
<xsl:text disable-output-escaping="yes"><</xsl:text>
<xsl:value-of select="@name"/>
<xsl:text disable-output-escaping="yes">></xsl:text>
<xsl:element name="action">
<xsl:value-of select="@action"/>
</xsl:element>
<xsl:element name="value">
<xsl:value-of select="value"/>
</xsl:element>
<xsl:text disable-output-escaping="yes" ></</xsl:text>
<xsl:value-of select="@name"/>
<xsl:text disable-output-escaping="yes"> > </xsl:text>
</xsl:template>
</xsl:stylesheet>
Iam getting the o/p like dis....
<?xml version="1.0" encoding="UTF-16"?><Header><company><action>C</action><howmanynumbers><action>Create</action><value>1</value></howmanynumbers > <howmanynumbers><action>Delete</action><value>a</value></howmanynumbers > <numbers><action>Update</action><value>123456</value></numbers > </company></Header>
But the value is not repeated only the first value in each property it is giving can anyone suggest the modification in stylesheet so that i will get the full output like dis
<howmanynumbers><value>1</value><value>2</value><value>3</value><action>Delete</action></howmanynumbers >
Thanks in advance
KuttanKuttan