cancel
Showing results for 
Search instead for 
Did you mean: 

problem with character '&' in xml source file

michel_dekimpe
Participant
0 Kudos

hello,

we have following scenario xml file -> xi proxy

the xml file contains the character '&' e.g. <tag>text & other text</tag>

it seems that the xi system has problems processing this

he considers all tags after the '&' character as text, not tags anymore

any ideas on how to solve this ?

thanks

regards,

michel

Accepted Solutions (1)

Accepted Solutions (1)

former_member200962
Active Contributor
0 Kudos

This needs to be solved using a JAVA mapping.....you might be getting error in the mapping step....there is a blog by Pooja Pandey on how to handle these (&) special characters using JAVA mapping.....you can refer to that for more info.

Regards,

Abhishek.

Shabarish_Nair
Active Contributor
0 Kudos

a very common issue.

the resolution is in this blog - http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/9420 [original link is broken] [original link is broken] [original link is broken]

Answers (4)

Answers (4)

Former Member
0 Kudos

As the replies say, the XML is invalid. Fix it on the sender side, NOT in XI

CSY

Former Member
0 Kudos

If you do not want XI to parse the & as a txt

put the chars that you don't desire to be parsed between CDATA tags:

<![CDATA[....Proc & G......        ]]>

Any txt within the CDATA tags won't be parsed by the parser

Former Member
0 Kudos

Hi ,

Basically the xml reads &a mp; as &, so if you replace "&" with "&a mp;" then you will not get this issue and this is what the java mapping suggested above does.

please remove space after &a above

This is what happens even whild posting reply also &am p; is not displayed:)

Regards,

Srinivas

Edited by: Srinivas on Apr 9, 2010 6:38 PM

Former Member
0 Kudos

>>the xml file contains the character '&' e.g. <tag>text & other text</tag>

The XML file is invalid. & is an escape charater in XML standard. Contact your sender application administrator to get this fixed.

No programming language/application which processes XML will be able to handle an XML with & character.