可能重复: InDesign CS5 Script: How can I ignore the DTD when importing XML?
下面是一个带有DTD文件声明的基本XML文件:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE article SYSTEM "blahblah.dtd">
<root-node></root-node>我在http://www.stylusstudio.com/xsllist/200104/post90620.html找到了这个XSL解决方案,这是不工作的:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<xsl:copy-of select="."/>
</xsl:template>
</xsl:stylesheet>( ...tested at ex2 )
那么,还有其他方法可以忽略!DOCTYPE声明,或者忽略DTD文件吗?
发布于 2012-07-31 21:34:53
我将使用regex解析xml并删除Doctype声明。
https://stackoverflow.com/questions/11749319
复制相似问题