Dp: serialize and slip away on datapower ibm

I have a project where I need to binary-64-encode an xml file and put it in another xml. To make this work, I first serialize xml with dp:serializeand then use dp:binary-encodefor the return variable. This works fine except that all Scandinavian characters escape. åäöGets the value åäöwhen decoding the result.

Any ideas? I tried using dp:escaping="minimum"the output tag ( xsl:outputdoes the tag affect dp:serialize?) And a number of other parameters. After printing the serialized result before binary-64 encoding, I saw that escaping is added when called dp:serialize.

Is it possible to serialize without escaping in datapower?

+4
source share
1 answer

I do not think you can serialize without escaping. Highlighting DataPower, for example. "disable-output-escaping" only affects the OUTPUT context, not the "embedded" XML ...

I think you should treat it as binary data and get the “untouched” XML file from / object / message / node ().

Since the binary node is not "xml", you can encode it directly:

<xsl:variable name="xmlInBase64" select="dp:binary-encode(/object/message/node())"/>
+2
source

All Articles