cancel
Showing results for 
Search instead for 
Did you mean: 

XML output - all tags in Single line?

Former Member
0 Kudos

Hi,

Scenario: HTTP----> XI --- > File(XML)/Proxy(abap).

Output XML file has the data in single line(all XML tags).

Now, issue with abap proxy which reads this XML file for sending attachment in email has length constraint(can not read if line length exceeds 255 chars).

Is there any option in XI, to print each pair of tags in each line(using carriage return or line feed?)

Please help.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Mallik,

I do not think that this can be achieved in XML to XML (unless you can create a specific module and add to the module tab)

But if you create say a CSV or TXT file and use the <b>Content Conversion Parameters</b> option

Here you can specify the fieldSeparator to be 'nl'

<b>Input</b>

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

<record>

<field1>f1</field1>

<field2>f2</field2>

<field3>f3</field3>

</record>

<b>Output</b>

f1

f2

f3

Here you have retained your data and each field is separated by a new line. Unfortunatley with this method you lose your XML tags

Regards,

Mike

Former Member
0 Kudos

Mallik,

If you are mapping the HTTP message into a message interface then the structure should format your XML into logical records. These records will then be written to your file with end of line markers

Regards,

Mike

Former Member
0 Kudos

<i>"structure should format your XML into logical records"</i>

Hi Mike, Can you please elaborate this? Is it possible to insert line break after each closing tag in XML?

Thanks