cancel
Showing results for 
Search instead for 
Did you mean: 

How to convert special charecter "&" in XML(not well formed) through XSLT

binnari_rampullaiah2
Participant
0 Kudos

Hi Experts,

Can any one tell me how to process the symbol '&' which is coming from incoming payload and throwing error in PI message mapping. I knew that the symbols &,<,> are not allowed in XML, and these symbols need to specified as like &

can anybody help to achieve this through XSLT mapping.

test messgae:

<Emp_Info>
<Ename>Govardhan</Ename>
<salary>100000</salary>
<locaton>delhi</locaton>
<designation>SSE</designation>
<address>Delhi&Banglore</address>
</Emp_Info>

In the above example, I need to replace the & symbol to &

Result:

<Emp_Info>
<Ename>Govardhan</Ename>
<salary>100000</salary>
<locaton>delhi</locaton>
<designation>SSE</designation>
<address>Delhi&Banglore</address>
</Emp_Info>

Thanks,

Govardhan

Accepted Solutions (1)

Accepted Solutions (1)

former_member190293
Active Contributor
0 Kudos

Hi Govardhan!

You could use java mapping to get payload as text string and replace "&" symbol with respective escape sequence.

Regards, Evgeniy.

Answers (1)

Answers (1)

SergioG_TX
Active Contributor
0 Kudos

agree w the prev comment -- all special chars have to be (XML) escaped, for example: & for &