XSLT og Cdata?
HejEr lidt novice ud i dette men jeg har behov for et output der ser således ud: (Bemærk at der i output skal være cdata for at den webservice jeg bruger virker.)
Håber på lidt respons.
Jesper
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SOAP-ENV:Body>
<m:GemIndSigelse xmlns:m="http://tempuri.org/hportal/XMLUpload">
<m:XMLfil><![CDATA[
<a6001_v1r0m0>
<IndkommenpostID>4</IndkommenpostID>
<mc_ansvar>ALLE</mc_ansvar>
</a6001_v1r0m0>
]]></m:XMLfil>
</m:GemIndSigelse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Mine data ser således ud:
<a6001_v1r0m0>
<IndkommenpostID>4</IndkommenpostID>
<mc_ansvar>ALLE</mc_ansvar>
</a6001_v1r0m0>
Og stylesheet:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" version="1.0" encoding="UTF-16" indent="yes" cdata-section-elements="a6001_v1r0m0"/>
<xsl:template match="/">
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SOAP-ENV:Body>
<m:GemIndSigelse xmlns:m="http://tempuri.org/hportal/XMLUpload">
<m:XMLfil>
<xsl:copy-of select="//a6001_v1r0m0"/>
</m:XMLfil>
</m:GemIndSigelse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
</xsl:template>
</xsl:stylesheet>
