cancel
Showing results for 
Search instead for 
Did you mean: 

Text file to Xml

Former Member
0 Kudos

Hi,

In my scenario the input file is .txt format and output is xml format, output is coming correctly but wiith single record..

When there are multiple records in input file, output file is coming with only one record..I also given unbounded in both sender and receiver...

How to get multiple records from text file to xml file?

Can any one give some suggestion to get multiple records in output

Regards

Prakash

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Chedk ur mapping.......iam sure u have not done ur mapping correct.

in source side header level and target side header level keep the node occurence as o..Unbounded and mapp them...........While testing the mapping only u can find ur geting multiple records or not.

check them and update the thread.

regards,

phani

Former Member
0 Kudos

Hi Kumar,

My source structure is

Mt_Text2Xml

EmpDetails 1..Unbounded

Emp 1..Unbounded

Emp_Id

Emp_Name

Emp_DOJ

Emp_Dep

In sxmb_moni i check in inbound message there all records are coming

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

<ns:MT_Text2Xml_OB xmlns:ns="http://trng37/text2xml">

<EmpDetails>

<Emp>

<Emp_Id>E100</Emp_Id>

<Emp_Name>Ganesh</Emp_Name>

<Emp_DOJ>22.10.1994</Emp_DOJ>

<Emp_Dep>Supporting</Emp_Dep>

</Emp>

<Emp>

<Emp_Id>E101</Emp_Id>

<Emp_Name>Kumar</Emp_Name>

<Emp_DOJ>22.10.1990</Emp_DOJ>

<Emp_Dep>Development</Emp_Dep>

</Emp>

<Emp>

<Emp_Id>E100</Emp_Id>

<Emp_Name>Siva</Emp_Name>

<Emp_DOJ>22.10.1992</Emp_DOJ>

<Emp_Dep>Quality</Emp_Dep>

</Emp>

</EmpDetails>

</ns:MT_Text2Xml_OB>

But i am not able to get multiple records

Regards

Prakash

Former Member
0 Kudos

Hi,

Take the payload from SXMB_MONI and test it in ur mapping check there target side multiple records are comming or not.

check the Mapping,the problem will be in mapping iam sure,i to got this type of problem once.....

regards,

Phani

Answers (5)

Answers (5)

Former Member
0 Kudos

hi praksah

there may be error in the content conversion also . check whether the content conversion is proper or not.check the input message in sxmb_moni, in the inbound payload message, whether in the input file the multiplerecords are coming or not.

Thanks

Rinku

Former Member
0 Kudos

Hi Prakash,

I think you should check your FCC once.

There can be a problem in "<b>Recordset Structure</b>" values.

Below is the example when you have HEADER & ITEM structure.

FCC is case sensitive, give all the names in FCC same as your Data Type.

In <b>Recordset Structure</b> = <b>Header,1,Item,*</b>

Header.fieldFixedLengths = (field lengths) e.g. 1, 4, 7

Header.fixedLengthTooShortHandling=ignore

Header.endSeperator='nl'

Item.fieldFixedLengths = give the item field length as shown above

Item.endSeparator = 'nl'

Item.lastFieldsOptional = YES

Regards,

Sarvesh

****Reward Points, if found helpfull.

Former Member
0 Kudos

Hi Prakash

suppose you are using the same structure at the source and target side

the the source and target structure will look like as below

source structure target structure

Mt_Text2Xml Mt_Text2Xml

EmpDetails 1..Unbounded EmpDetails 1..Unbounded

Emp 1..Unbounded Emp 1..Unbounded

Emp_Id Emp_id

Emp_Name Emp_Name

Emp_DOJ

Emp_Dep

Former Member
0 Kudos

hi Prakash

please make the occurence for the target node as 0 to unbounded then only you will be able to get the multiple records at the target side

Thanks

Rinku

Former Member
0 Kudos

Hi Prakash

check whether the occurence for the target node is 0..unbounded.

like structure

data (0..unbounded)

header ((0..unbounded)

fname (0..1)

lanme (0..1)

another way isgo to SXMB_MONI, take the input payload from the SXMB_MONI and check it in message mapping.

Thanks

Rinku