嗨,谢谢你
鉴于此输入 XML
<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>
我想将其转换为
<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>
我从 asp 经典提要中收到此 XML,我可以访问 asp 并且可以在那里执行,一旦收到我在 php 中,然后我发送到 xsl 转换以输出到浏览器
所以我的问题是哪一个是最好的方式,即 asp、php 或 xsl,是否有可能至少让我开始以最好的方式做到这一点
再次感谢蒂姆·道奇森