日期:2014-05-17  浏览次数:20649 次

如何把一段xml字符串,在html显示的
一个servlet中,

获取了一个字符串,里面的内容是xml字符串,如下面:
XML code

<note><id>1</id><title>test2</title><link>http://www.google.com/</link><description>desc</description><html>texts</html><section_id>1</section_id><order>1</order></note><note><id>3</id><title>prototype</title><link>prototype</link><description>prototype</description><html>test</html><section_id>1</section_id><order>3</order></note><note><id>5</id><title>jquery</title><link>jquery.com</link><description>new wave of javascript</description><html>test jquery</html><section_id>1</section_id><order>2</order></note><note><id>11</id><title>test</title><link>http://www.sina.com.cn/</link><description>sinaa</description><html>dksldkfdsdf</html><section_id>1</section_id><order>4</order></note><note><id>21</id><title>test</title><link>http://www.google.com/</link><description>google</description><html>test</html><section_id>10</section_id><order>2</order></note><note><id>22</id><title>test2</title><link>http://www.yahoo.com/</link><description>yahoo</description><html>test</html><section_id>10</section_id><order>1</order></note><note><id>23</id><title>java</title><link>http://www.javaeye.net</link><description>test</description><html>dskdlkfsdf</html><section_id>5</section_id><order>1</order></note>



现在我想把它通过样式xsl直接显示为html,应该怎么做呢?谢谢!

我遇到的问题是,不知道如何处理这段xml,我不想把它存为xml文件中,也不用第三方类库能做到吗?谢谢



------解决方案--------------------
探讨


那个类的?