cancel
Showing results for 
Search instead for 
Did you mean: 

File format

Former Member
0 Kudos

I am writing a rfc response to a file after mapping to a specific format as xml file.

I am getting rfc response in xi with & and > or < symbols and when they are written to a file, it gets replaced by &gt; or &amp;. What sould be done ??

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Thilothama,

I may not be able to give u a solution. But some direction...

I think it has sth do with XML. If i remember it right, it is the XML way treating the spl chars.

Something could be done in file content conversion parameters.

Hope these will help.

-Naveen.

Answers (5)

Answers (5)

HarshC
Active Participant
0 Kudos

Hi Thilothama,

The rfc response is valid, as &,<,> are not allowed in xml directly. They are represented by &gt; &lt; and &amp. However this is only within the xml file. I think they should automatically get converted to & , < and > during mapping!

Can you please detail on how you are mapping the rfc to the file. Also is the file in xml format?

Regards,

Harsh

Former Member
0 Kudos

Hi Thilothama,

As Jithesh said, try using various encoding techniques in ur adapter channel. <b>UTF-8</b> should do the conversion just fine. In case that doesn't work out, try using <b>ISO-8859-1</b>. You can try even <b>ISO-8859-16</b>.

Also have a look at this thread..

Here, Ricardo has overcome a similar problem.

Hope this helps you!

cheers,

Prashanth

Former Member
0 Kudos

I did the UTF-8 and ISO's but still the symbols are not replaced. If I use ISO 8859-1 or 16 the output file itself is not generated.

Former Member
0 Kudos

Hi,

Try making the file type to text. Binary file type may be creating a problem.

Regards,

Smitha.

Former Member
0 Kudos

I have it as text only still not working.

Former Member
0 Kudos

Did you try out what Ashish suggested?

It looks promising.

Regards,

Smitha.

Former Member
0 Kudos

Hi Thilothama ,

While mapping your rfc response try to use a user defined function (if it is graphical mapping)which will replace symbols like > or > & for that particular field . You can for e.g write this small piece of code .

String a = <Your Actual Field Content> ;

a.replaceAll("&","&amp;");

a.replaceAll("<","&lt;");

a.replaceAll(">","&gt;");

return a;

I hope this helps you out .

Thanks & Regards,

Ashish Sharma .

Former Member
0 Kudos

Hi,

If you have used Graphical mapping XI should take care of those special characters. but in case of Java mapping you have to take care of special characters. <,>,& and ' are treated as special charaters in XML. So If you are forming XML then you need to write replace "&" with "&amp;" and similarly "<" with "&lt;" , ">" with "&gt;", "'" with "&apos;".

-Kavita

Former Member
0 Kudos

Hi,

this conversion can be avoided by using a encoding scehme ion ur adapter communication channel.try giving ur <b>basic type as text and the encoding type as UTF-8</b>.u can also try using other file encoding schemes like iso 8859-1

hope this helps u

regards

jithesh