下面是我的XSL如何从输出xml中删除命名空间?
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ms="http://www.test.com/schemas/test"
xmlns:ns="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="ms ns">
<xsl:output method="xml" indent="yes"/>
<xsl:template match="/">
<XMLResponse>
<xsl:apply-templates select="ms:ProductRS/ms:Product"/>
</XMLResponse>
</xsl:template>
<-- some templates here -->
</xsl:stylesheet>
在输出我越来越像下面
<?xml version="1.0" encoding="UTF-16"?>
<XMLResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Product>-----</Product>
</XMLResponse>
我需要从XML输出中删除xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
什么环境,你在工作,而且是在XMLResponse线XSI命名空间的唯一参考? – 2012-02-19 19:28:32
为什么你需要删除该命名空间?你为什么想要? – 2012-02-19 19:47:36