I am receiving a standard XML document inside an any tag. Currently I simply copy the entire document received an insert it inside the any tag as shown in the XSLT below:
<xsl:element name="msgBody">
<xsl:copy>
<xsl:copy-of select="/" />
</xsl:copy>
</xsl:element>
This works as intended in that it inserts the XML document where the any tag is placed in the schema. However this needs to be sent to an SQL database using the WCF-SQL adapter. Therefore I need to unescpae the XML, since the < > characters are being interpreted by the adapter, which throws an error like this:
"The start element with name X and namespace X was unexpected. Please ensure that your input XML conforms to the schema for the operation."
The any tag is set to skip xml processing. I understand that there's an option to disable output escaping on the value-of element, but how can I achieve this using the copy-of element? Will I instead need to implement a pipeline to handle the escaping?
In short, I want an XML string like this:
<bizSaveDocument>
<conversationID>829c0747-76e0-4298-a9f1-0fcc2a234668</conversationID>
<fromID>NULL</fromID>
<toID>NULL</toID>
</bizSaveDocument>
To be escaped, so that the output of the map becomes this:
<bizSaveDocument>
<conversationID>829c0747-76e0-4298-a9f1-0fcc2a234668</conversationID>
<fromID>NULL</fromID>
<toID>NULL</toID>
</bizSaveDocument>