如何显示xml文件 [英] how to display xml file
本文介绍了如何显示xml文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好
i在xml文件中为我的网站创建一个站点地图.i在aspx文件中显示xml文件的内容。
但我希望显示xmlfile不在aspx中。
当我使用response.redirect(sitemap.xml)时,它显示了树,但我想只显示顺序中不在树中的所有内容。
像这样:
xmlfile的内容:
< t >
< t1 p = s1 >
< / t1 >
< t2 p = s2 >
< < span class =code-leadattribute> / t2 >
< / t >
但我想要地址栏= sitemap.xml并显示如下:
p = s1p = s2 .. ...
任何想法?任何解决方案?
谢谢。
解决方案
您可以使用XSLT将任何XML转换为更具html可呈现形式,请参阅此处: http://www.w3schools。 com / xml / xml_xsl.asp [ ^ ]
hello
i create a sitemap for my website in an xml file.i display content of xml file in aspx file.
but i want display xmlfile not in aspx.
when i use response.redirect("sitemap.xml"),it shows tree but i want to show only all content in sequential not in tree.
like this:
content of xmlfile:
<t>
<t1 p="s1">
</t1>
<t2 p="s2">
</t2>
</t>
but i want address bar=sitemap.xml and show like this:
p=s1p=s2 .....
any idea?any solution?
thank you.
解决方案
You can transform any XML into a more html presentable form with XSLT , see here : http://www.w3schools.com/xml/xml_xsl.asp[^]
这篇关于如何显示xml文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文