cancel
Showing results for 
Search instead for 
Did you mean: 

XML output in File Receiver

Former Member
0 Kudos

Hi All,

I have an JMS to File interface that outputs an XML file.

The XML is being written to the file in one long line of text like below


<?xml version="1.0" encoding="UTF-8"?>
<field1>test</field1><field2>test</field2><field3>test</field3><field4>test</field4><field5>test</field5><field6>test</field6><field7>test</field7><field8>test</field8><field9>test</field9>

How can I get it to write out like this..


<?xml version="1.0" encoding="UTF-8"?>
<field1>test</field1>
<field2>test</field2>
<field3>test</field3>
<field4>test</field4>
<field5>test</field5>
<field6>test</field6>
<field7>test</field7>
<field8>test</field8>
<field9>test</field9>

I can't see any option in the File Communication Channel to do this???

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hello Buddy,

Just Execute the transaction CG3Y/CG3Z and give the destination Folder on your local machine and you give the source folder and the save it with extention .xml......just indent the file ...thats it....

**************Reward points,if you found useful

Former Member
0 Kudos

>

> Hello Buddy,

>

>

>

> Just Execute the transaction CG3Y/CG3Z and give the destination Folder on your local machine and you give the source folder and the save it with extention .xml......just indent the file ...thats it....

>

>

> **************Reward points,if you found useful

These transactions don't exist according

Former Member
0 Kudos

Where you r getting this long one line file??

what is the output format of the file?

Check it in internet explorer.

Former Member
0 Kudos

Sorry the XML is just an example.

The interface outputs the XML file to a folder on a UNIX server. A seperate application picks up this file and moves it to a Windows server. This transfer is failing because the application cannot move a file if it has a Record length of more than '32K' bytes. therefore, i can't have the XML all in one line.

Former Member
0 Kudos

Damien,

Depending on how your create your target document, you could use :

XSLT : <xsl:output method="xml" indent="yes"/> it will automatically creates indentation according to XML structure, instead of flat structure,

JAVA: you can explicitly set the EOL pattern wherever you want (but this will require some coding). The XML framework you use may also offer native tool(s) to handle this.

Chris

prateek
Active Contributor
0 Kudos

I think both the files are same. Open it in explorer and u can see the results. I noticed that there are no root node element in ur file.

Regards,

Prateek