使用XSL将XML文档中的CDATA注释输出为HTML文本(excel表格xml怎么转xlsx)没想到

随心笔谈11个月前发布 admin
92 0

示例代码

1. test.xml

entry with images

August 09, 2003

Kevin

000033

http://alazanto.org/xml/archives/000033.xml

http://alazanto.org/xml/archives/000033_comments.xml

6

</entry>

2. test.xsl

<xsl:stylesheet xmlns:xsl=”http://www.w3.org/1999/XSL/Transform” version=”1.0″>

<xsl:value-of select=”body” disable-output-escaping=”yes”/>

</xsl:stylesheet>

关键之外在于使用的命名空间xmlns:xsl=”http://www.w3.org/1999/XSL/Transform” 和输出时加上disable-output-escaping=”yes”

© 版权声明

相关文章