Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries [Thread Prev] >Thread Next - Re: Coverting the Elements to Attributes, of the an XML file - giving another XML file Coverting the Elements to Attributes, of the an XML file - giving another XML fileTo: NULL Date: 7/6/2006 8:36:00 AM Hi I need to convert the an XML file to a new format, some of the elements of the Input XML file needs to be converted as attributes in the resulting file. Input File Format: <myxml> <Level1> <level2> <name> Sample 1</name> <description>This is Sample 1 </description> </level2> <level2> <name> Sample 2</name> <description>This is Sample 2 </description> </level2> <name> Sample 3 (level1)</name> <description>This is Sample 3(level1) </description> </level1> </myxml> The desired output file should be: <myxml> <Level1 name = "Sample 3 (level1)" description = "This is Sample 3(level1) "> <level2 name="Sample 1" description = "This is Sample 1 " /> <level2 name = "Sample 2" description = "This is Sample 2" /> </level1> </myxml> Note: there can be multiple levels and more than one level1 elements. Kindly let me know, how to translate the Input XML file to the Output format, using XSLT. Thank you, Regards Regis | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
