cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

XML to string using xslt or java mapping

Former Member
0 Likes
1,234

Hi Experts,

I want to put xml into string and i need to change lessthan symbol to "&lt" and greaterthan symbol to "&gt" , can anyone please help me how to do this??? can you provide code for java mapping or XSLT mapping to achive this.

SOURCE

<?xml version="1.0" encoding="UTF-8"?>

<ns0:source_mt xmlns:ns0="urn:ppp:prototype">

<row>

<name1>IT</name1>

<name2>SOLUTIONS</name2>

</row>

</ns0:source_mt>

TARGET

<?xml version="1.0" encoding="UTF-8"?>

<ns0:target_mt xmlns:ns0="urn:ppp:prototype">

<row>

<Body>"&lt"name1"&gt" IT"&lt"/name1"&gt" "&lt"name2"&gt" SOLUTIONS"&lt";/name2"&gt" </Body>

</row>

</ns0:target_mt>

View Entire Topic
baskar_gopalakrishnan2
Active Contributor
0 Likes

Have you seen this link?

/people/jyothi.anagani/blog/2010/06/17/convert-the-input-xml-to-string-in-pi-71-using-standard-graphical-mapping

Use Return as XML option in the mapping to achieve this. I believe you use PI 7.1 and above.

If your version is below 7.1 then use

http://wiki.sdn.sap.com/wiki/display/XI/JavaMapping-ConverttheInputxmlto+String