cancel
Showing results for 
Search instead for 
Did you mean: 

'<' replaced by '<' in resulting XML

Former Member
0 Kudos

Hi all,

in the message mapping for my outgoing XML I put '<![CDATA[[' and ']]]>' around the node-value. During testing it looks fine, but in the actual XML the greater-then (>) and smaller-then(<) signs are replaced by &gt and &lt so that the receiving xml-parser just sees it as part of the value-sting...

Is this a known problem? How can I solve this?

Thanks and regards,

William

Accepted Solutions (1)

Accepted Solutions (1)

GabrielSagaya
Active Contributor
0 Kudos

Use an XSL and simply specify disable-output-escaping = 'no' and the output will be in &lt/&gt instead of .

Former Member
0 Kudos

Thanks for the quick reply

I am quite new to XI, how do I "Use an XSL and simply specify disable-output-escaping = 'no' "?

Thanks and regards

William

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello ,

Characters like "<"&" are illegal in XML elements.

So,

To avoid errors script code can be defined as CDATA.

Everything inside a CDATA section is ignored by the parser.

A CDATA section starts with "<![CDATA\" and ends with \"]>":

<b>

<scipt>

<![CDATA[

function matchwo(a,b)

{

if (a < b && a < 0) then

{

return 1;

}

else

{

return 0;

}

}

]]>

</scipt>

In the example above, everything inside the CDATA section is ignored by the parser.

Notes on CDATA sections:

A CDATA section cannot contain the string "]]>". Nested CDATA sections are not allowed.

The "]]>" that marks the end of the CDATA section cannot contain spaces or line breaks.

*******Reward points,if found useful

Former Member
0 Kudos

Hi BVS,

yes I know..I try to put the CDATA around the node-value in the output-xml, but the smaller-then sign is replaced by &lt and the greater-then sign is replaced by &gt in the resulting xml-file. This replacing I want to avoid but how can I do this?

Regards

William