首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > XML SOAP >

convert XML into other format XML using XSLT,该如何解决

2012-03-17 
convert XML into other format XML using XSLTsorry firstly as i cant type in chinese char,.i want t

convert XML into other format XML using XSLT
sorry firstly as i can't type in chinese char,.

i want to convert xml into another xml with different namespace in it.
below is my codes.
i can open the final xml in browser, but not the one i expected. 

-----------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="Desktop/xsltest.xsl"?>
<!-- Edited by XMLSpy® -->
<breakfast_menu>
<food>
<name>Belgian Waffles</name>
<price>$5.95</price>
<description>two of our famous Belgian Waffles with plenty of real maple syrup</description>
<calories>650</calories>
</food>
<food>
<name>Strawberry Belgian Waffles</name>
<price>$7.95</price>
<description>light Belgian waffles covered with strawberries and whipped cream</description>
<calories>900</calories>
</food>
  .....................................
<breakfast_menu>

---------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="yes" />

<xsl:template match="/breakfast_menu">
<breakfast_menu>
<xsl:apply-templates select="food" />
</breakfast_menu>
</xsl:template>

<xsl:template match="food">
<name><xsl:value-of select="name" /></name>
<price><xsl:value-of select="price" /></price>
</xsl:template>

</xsl:stylesheet>

-------------------------

i want to use xslt to convert xml into xml, 
not use xslt to convert xml into html, 



[解决办法]
你要的结果是什么格式样子的?

热点排行