Skip to Content

problem with character '&' in xml source file

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

5 Answers

  • Best Answer
    avatar image
    Former Member
    Apr 09, 2010 at 10:35 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 12, 2010 at 11:52 AM

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

    CSY

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 09, 2010 at 10:57 AM

    >>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.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 09, 2010 at 01:07 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 09, 2010 at 07:06 PM

    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

    Add comment
    10|10000 characters needed characters exceeded