Skip to Content

XML within XML in SAP PI

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

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

    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

    Add comment
    10|10000 characters needed characters exceeded

  • Jul 12, 2017 at 11:34 AM
    Add comment
    10|10000 characters needed characters exceeded