Skip to Content
avatar image
Former Member

Text file to Xml

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

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

6 Answers

  • Best Answer
    avatar image
    Former Member
    Oct 04, 2007 at 05:53 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      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

  • avatar image
    Former Member
    Oct 04, 2007 at 05:56 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 04, 2007 at 06:05 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 04, 2007 at 06:11 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 04, 2007 at 06:29 AM

    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. 😊

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 04, 2007 at 06:44 AM

    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

    Add comment
    10|10000 characters needed characters exceeded