怎么把xml里面的内容通过html直接显示
例如:http://www.prnasia.com/xprn/RSS.do?method=toRssXml&industryId=2000&langId=2 这个。你点击看到的页面是html页面风格显示的~,但是你右键源码查看里面的内容又是xml的。
请问,它是怎么弄的~ 谢谢~~~~~
例如:http://www.prnasia.com/xprn/RSS.do?method=toRssXml&industryId=2000&langId=2 这个。你点击看到的页面是html页面风格显示的~,但是你右键源码查看里面的内容又是xml的。
请问,它是怎么弄的~ 谢谢~~~~~
http://www.prnasia.com/xprn/RSS.do?method=toRssXml&industryId=2000&langId=2
我想知道为什么 点击这个链接显示的这样的~不是现在xml风格布局的页面~~
这个就是RSS,浏览器支持RSS,就可以将XML以网页的形式显示出来。
这个是jstl<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:template match="/">
<html>
<body>
<form method="post">
<h2>Tool Information (edit):</h2>
<table border="0">
<xsl:for-each select="tool/field">
<tr>
<td>
<xsl:value-of select="@id"/>
</td>
<td>
<input type="text">
<xsl:attribute name="id">
<xsl:value-of select="@id" />
</xsl:attribute>
<xsl:attribute name="name">
<xsl:value-of select="@id" />
</xsl:attribute>
<xsl:attribute name="value">
<xsl:value-of select="value" />
</xsl:attribute>
</input>
</td>
</tr>
</xsl:for-each>
</table>
<br /></form><form action="http://www.baidu.com/s" method="get">
baidu: <input type="text" name="wd" /> <br /><input type="submit" id="btn_sub" name="btn_sub" value="Submit" />
<input type="reset" id="btn_res" name="btn_res" value="Reset" />
</form>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="tool.xsl"?><tool> <field id="prodName">
<value>HAMMER HG2606</value>
</field>
<field id="prodNo">
<value>32456240</value>
</field>
<field id="price">
<value>$30.00</value>
</field>
</tool>上面是tool.xsl
这个是tool.xml
然后ie打开 tool.xml
无视我吧