Transform XML to different layout

Soldier00

New Member
Hi and Thank you in AdvanceGiven this Input XML\[code\]<root><part id='74'> <title>Belt</title> <description>1158J5</description> <partno>C00112576</partno> <price>10.99</price></part><category id='6' name='Washer-Dryer'></category><category id='2' name='Washing machine'></category><make id='6' name='Ariston'></make><make id='2' name='Hotpoint'></make><make id='33' name='Indesit'></make><model catid='2' catname='Washing machine' makeid='6' makename='Ariston' modelid='524'>A1235</model><model catid='2' catname='Washing machine' makeid='2' makename='Hotpoint' modelid='413'>SCR37P</model><model catid='2' catname='Washing machine' makeid='2' makename='Hotpoint' modelid='35751'>WD440</model><model catid='6' catname='Washer-Dryer' makeid='33' makename='Indesit' modelid='2989'>WF000G</model>\[/code\] I would like to transform it to\[code\]<root><part id='74'> <title>Belt</title> <description>1158J5</description> <partno>C00112576</partno> <price>10.99</price></part><category id='6' name='Washer-Dryer'> <make id='33' name='Indesit'> <model catid='6' catname='Washer-Dryer' makeid='33' makename='Indesit' modelid='2989'>WF000G</model> </make></category><category id='2' name='Washing machine'> <make id='6' name='Ariston'> <model catid='2' catname='Washing machine' makeid='6' makename='Ariston' modelid='524'>A1235</model> </make> <make id='2' name='Hotpoint'> <model catid='2' catname='Washing machine' makeid='2' makename='Hotpoint' modelid='413'>SCR37P</model> <model catid='2' catname='Washing machine' makeid='2' makename='Hotpoint' modelid='35751'>WD440</model> </make></category>\[/code\]I receive this XML from a asp classic feed, i have access to the asp and could do it there, once recieved i am in in php, i then send to a xsl transform to output to the browserSo my question is which would be the best way to go ie asp, php or xsl and would it possible to at least start me off on the best way to do thismany Thanks againTim dodgson
 
Back
Top