Skip to Content
0

XML within XML in SAP PI

Jul 12, 2017 at 10:56 AM

70

avatar image

Hi Experts,

My scenario is Proxy to File. The proxy is of below structure:

<Document><RecordSet>

<Record>

</Record>

</RecordSet>

I need to concatenate the values coming in <Record> which is 1..n . I have concatenated and it is working as fine. But the data with Record has XML tags , that does not pass to the target field.

eg <Document><RecordSet>

<Record>Name

</Record>

</RecordSet>

<RecordSet>

<Record>Gita<and>Rita

</Record>

</RecordSet>

The out put I get is NameMerina instead of NameGita<or>Rita

Please let me know If I can include the XML tags as output in my target structure.

Thanks & Regards,

Merina

10 |10000 characters needed characters left characters exceeded

sorry for the type - the output I get is NameGita instead of NameGita<and>Rita

0
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
avatar image
Former Member Jul 12, 2017 at 11:35 AM
0

Hi Merina,

I'm not sure if I fully understood the problem but "<Record>Gita<and>Rita</Record>" is not valid XML as "<and>" would be interpreted as an element that you're not closing with an end tag. If you must have this kind of string as an element's value, you'll need to escape

I would suggest trying that. Possibly it will already resolve your issue.

Regards,
Patrick


code.png (1.7 kB)
Show 1 Share
10 |10000 characters needed characters left characters exceeded

Hi Patrick,

I used this and XSLT mapping and it worked.

Regards,

Merina

0
Raghuraman S Jul 12, 2017 at 11:34 AM
0
Share
10 |10000 characters needed characters left characters exceeded