Hi,
Following is my XML
<Customer_Details>
<Name_Info>
<Name>temp1</Name>
</Name_Info>
<Name_Info>
<Name>temp2</Name>
</Name_Info>
<Name_Info>
<Name>temp3</Name>
</Name_Info>
</Customer_Details>
Using my application I have searched the Last name from Database of each customer and now using XSL i have to copy it under respective Name_Info node. but when i am trying to copy it is copying Last name at only firt Name_Info node.
Following is my XSL
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="
http://www.w3.org/1999/XSL/Transform">
<xsl:template match="context">
<xsl:for-each select="Customer_Details/Name_info">
<LastName>
<xsl:value-of select="Customer_Info/LastName"/>
</LastName>
</xsl:for-each>
</xsl:template>
<xsl:template match="text()"/>
</xsl:stylesheet>
Desired OutPut
<Customer_Details>
<Name_Info>
<Name>temp1</Name>
<LastName>lastname1<LastName>
</Name_Info>
<Name_Info>
<Name>temp2</Name>
<LastName>lastname2<LastName>
</Name_Info>
<Name_Info>
<Name>temp3</Name>
<LastName>lastname3<LastName>
</Name_Info>
</Customer_Details>
Thanks
Dishant