cancel
Showing results for 
Search instead for 
Did you mean: 

consolidation of messages...........

Former Member
0 Kudos

Hi all,

I am doing file to file scenario.When I use APPEND in the File adapter it is also adding <?xml version="1.0" encoding="UTF-8" ?>

I need to send a file for every 10 minutes consolidate all files and send at the end of the day.

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

<ID>31154</ID>

The next time when i send the file with different< ID>31155</ID>

it should append ignoring <?xml version="1.0" encoding="UTF-8" ?>

The consolidated file must look like this...

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

<ID>31154</ID>

< ID>31155</ID>

Thanks ,

Srinivas

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member189558
Contributor
0 Kudos

Hi Srinivas,

U can use the file adapters option of calling an operating system command..

Call a shell script and let it trim off the extra <XMl..> tags..

Former Member
0 Kudos

Can you please let me know the same in detailed way.

Please send me the script and where to paste it.

Thanks

prabhu_s2
Active Contributor
0 Kudos

i'm not if u can have this acheived using xi but u can have a batch file executed that will handle this....this is not a part of xi. u need to write a java prgram (or any) to handle this

Former Member
0 Kudos

Hi can u please Elobarate the Same.Please send me the code.

Thanks

prabhu_s2
Active Contributor
0 Kudos

after the interface had appended the data have one java program that opens the file and delete the duplicated xml tag...in this way u will have only one header tag. u need to schedule this java program as required,

Former Member
0 Kudos

Can you please provide an example and tell me the same.

actually I did not get you.Please provide me a sample java code if possible.

Thanks,

Srinivas