cancel
Showing results for 
Search instead for 
Did you mean: 

xi graphical mapping ampersand

Former Member
0 Kudos

Hello Experts,

in my xi graphical message mapping I have a problem:

In the mapping I fill some target fields with constants which contain ampersands.

In the target message the ampersands (&) appear as "amp;" and this is not accepted by the following system.

The problem occurs as well by testing the mapping as in runtime.

Any idea, how to fix it?

Thanks a lot in advance.

Regards,

Fred

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi Chilla, Stefan and Bhavesh,

thanx a lot for the fast help.

Now i noticed, what a "xml-greenhorn" I am

Well, it seems that I have to find the mistake in the target system to accept the ampersands.

Best regards,

Fred

henrique_pinto
Active Contributor
0 Kudos

Probably the XML is being used as pure string instead of being parsed.

Try to parse it, using DOM for example (its easier) and the use Node.getValue() methode.

It should return the string without escaped chars.

Regards,

Henrique.

Former Member
0 Kudos
Former Member
0 Kudos

Hi Stefan,

the error is in the target system but the reason is the special character in the target message of the message mapping.

What do you mean by "& has to be escaped"?

The target system is an online product catalogue and with the mapping I create the xml-file, which is the base for this catalogue.

Thanx.

Regards,

Fred

bhavesh_kantilal
Active Contributor
0 Kudos

Fred,

& is an escape characters in XML .

and so, when you want & to be available inside some text in a valid XML , this & internally is stored as & amp ;

( space given here so that it is not escaped by the Forum editor )

This is XML standard and any valid XML will escape an & as above. Your target application should be able to handle this and would need to make changes as this is XML standards.

regards

Bhavesh

stefan_grube
Active Contributor
0 Kudos

I found this in Internet:

http://www.w3.org/TR/xhtml1/guidelines.html#C_12

& is not allowed in XML. It must be replaced with &

Stefan

stefan_grube
Active Contributor
0 Kudos

There is no posibility to fix it, as the error is in the target system.

& has to be escaped in an XML message, this is standard.

What is the target system?

Stefan

Former Member
0 Kudos