我正在寻找从xml中删除XML标签并单独传递数据的方法。
输入
<?xml version="1.0" encoding="UTF-8"?>
<ns0:mt xmlns:ns0="urn:upfield.poc.com:RestPolling"><data>
--BOUNDARY
Content-type: application/x-www-form-urlencoded
Content-length: 140
AppVersion=1.0&amp;acceptUPSLicenseAgreement=Yes&amp;ResponseType=application/x-ups-pld&amp;VersionNumber=V4R1&amp;UserId=KPS001CA&amp;Password=KPSS
--BOUNDARY
</data></ns0:mt>
输出 - 边界 内容类型:application / x-www-form-urlencoded 内容长度:140 AppVersion = 1.0&amp; acceptUPSLicenseAgreement =是&amp; ResponseType =应用程序/ x-ups-pld&amp; VersionNumber = V4R1&amp; UserId = KPS001CA&amp; Password = KPSS -边界
我正在尝试这段代码,但没有得到输出。你能建议吗?
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" omit-xml-declaration="yes"/>
<xsl:template match="@* | node()">
<xsl:copy>
<xsl:apply-templates select="@* | node()"/>
<xsl:value-of select="replace('<ns0:mt xmlns:ns0=','')"/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>