cancel
Showing results for 
Search instead for 
Did you mean: 

Handling new line character in XML

Former Member
0 Kudos

Hi,

Question : How can we specify new line character in xml ?

Explaination for use :

I have a xml structure like :

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

<MT_ISO8583_XML_request>

<TRANSDETAILS>.

.

.

<TRANSACTIONAMOUNT>0000000000000000</TRANSACTIONAMOUNT>

<SYSAUDITNUMBER>225998394671</SYSAUDITNUMBER>

.

.

</TRANSDETAILS>

</MT_ISO8583_XML_request>

I am using Java mapping to convert xml to some satndard flat file format. It works fine for single message.

To handle multiple message i am using Multimapping split. Multimapping needs xml tags in traget structure also to split the message.

To achieve it without BPM, I want to take the whole content of my target file to one tag. When i do this i lost all the new line characters aslo. How can i preserve my new line character using XML ?

Regards

Kulwinder

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

hi

you can use FCC parameter like following.

fileseprator is 'nl'.

but as you mention that file is coming in xml format,so its up to you that you want use FCC.

thanks

stefan_grube
Active Contributor
0 Kudos

Are you sure, that the nl characters are deleted?

They are usually not shown in the XML display.

You can also use an adapter module instead of a Java mapping. So you can do a split in mapping, but the conversion to the flat file in the adapter module. If you have already a Java mapping for this purpose, you can easily create an adapter module based on that Java code.

Regards

Stefan

Former Member
0 Kudos

Any Help Please.....................

prateek
Active Contributor
0 Kudos

I am not sure if it helps but if you want to insert a newline through your code, the you may do the following.

String newLine = System.getProperty("line.separator");
write(newLine);

Regards,

Prateek