下面是我的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