[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: XML to XML using XSL: help
Hi I hope that follows help you :) <?xml version='1.0'?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0'> <xsl:template match="/"> <Criteria> <Messages> <xsl:apply-templates/> </Messages> </Criteria> </xsl:template> <xsl:template match="Messages"> <Message code="{@Code}"><xsl:value-of select="@Message_Text"/></Message> </xsl:template> </xsl:stylesheet> And read books... NM> I have an XML like this. NM> <Criteria> NM> <Messages Code="SSS" Message_Text="Congrats!" /> NM> <Messages Code="JJJ" Message_Text="Bad Luck"/> NM> <Criteria> NM> Can someone help me in transforming into the following NM> using XSL. I want to use XSL and transform this into NM> XML like below. NM> <Criteria> NM> <Messages> NM> <Message code="APF">Congrats!</Message> NM> <Message code="JJJ">Bad Luck!</Message> NM> </Messages> NM> </Criteria> NM> Appreciate any help. Thanks in Advance. NM> Nischal -- Ñ óâàæåíèåì, Vasil I Yaroshevich
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|