on 08-22-2014 9:09 PM
Hello, we have a 3rd party sending us information like:
<ns0:foo><content><?xml version="1.0" encoding="UTF-8"?><
{lots more escaped XML here"}
</content>
</ns0:foo>
What is the best way to parse this internal content into a message type?
Ok I figured out an XSLT map which does a nice job of converting escaped XML back into a good format:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="yes"/>
<xsl:template match="node() | @*">
<xsl:copy>
<xsl:value-of select="." disable-output-escaping="yes" />
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
On my mapping I just get rid of the extra XML declaration and then put this XSLT at the end of the Operation Mapping. My output file is an XML file which can then be processed further inside normal PI mappings.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Aaron,
This can be handled at mapping level by writing the Java mapping to deserialize the data.
After parsing to message type, call graphical mapping if any structural transformations/business logics needs to be handled.
Regards,
Krupa
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.