on 10-28-2014 10:54 AM
Dear Friends,
Interface output is an XML file CDATA tags are being used. In message mapping concatenation is being done to created CDATA tags.
XML file when seen in IE.
<?xml version="1.0" encoding="UTF-8"?>
-<Jobs>
-<Job>
<JOBTITLE><![CDATA[test]]></JOBTITLE>
<REQNUMBER><![CDATA[50001336]]></REQNUMBER>
<COUNTRY><![CDATA[USA]]></COUNTRY>
<JOBLINK><![CDATA[http://saph2d01.vsp.com/sap/bc/erecruiting/posting_apply?param=http://sapa201.k2e.com/sap/bc/erecrui/post?param=cG9zdF9pbnN0X2d1aWQ9NEQ3MDE2RTE4MUImY2FuZF90eXBlPQ3...&sap-client=400]]></JOBLINK>
</Job>
-----XML file when seen notepad.
<?xml version="1.0" encoding="UTF-8"?>
<Job>
<JOBTITLE><![CDATA[test]]></JOBTITLE>
<REQNUMBER><![CDATA[50001336]]></REQNUMBER>
<COUNTRY><![CDATA[USA]]></COUNTRY>
<JOBLINK><![CDATA[http://sapa201.k2e.com/sap/bc/erecrui/post?param=cG9zdF9pbnN0X2d1aWQ9NEQ3MDE2RTE4MUImY2FuZF90eXBlPQ3...&sap-client=400]]></JOBLINK>
</Job>
In notepad < instead of < and & instead of & is coming. Client is opening file in notepad and raised this concern.
Please advice on
-> Why notepad output is behaving like this?
-> What can be done in PI so that this conversion doesn't happen. & should come instead of & in notepad.
Thanks.
SM.
Hi,
Similar issue is discussed in this topic: . The conclusion is that you will probably have to use additional XSLT mapping to avoid the special characters being converted to escape sequences. You need to use the disable-output-escaping="yes" attibute, see more details here:
XSLT &lt;xsl:text&gt; Element
Regards,
Grzegorz
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear Sumeet,
As replied by our friends you need to handle CDATA format in different way, better use XSLT mapping to handle special characters.
Thanks,
Naveen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sumeet
I think the engine behind PI's graphical mapping will automatically convert any XML special character to the equivalent value that is valid for XML.
As already mentioned by Grzegorz, the CDATA needs to be handled differently.
An alternative to XSLT would be a Java mapping. You can create correct CDATA sections using the DOM approach with the createCDATASection method. Following are some examples using this method.
Rgds
Eng Swee
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.