IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  Convert XML String to CSV Flat file

    Posted Tue November 18, 2008 04:18 PM

    Hi,

    I want to convert xml string to a csv flat file.

    Is there any ready to use service available in webMethods API?

    If not then can any one please help me out?

    Thanks in Advance


    #webMethods
    #Integration-Server-and-ESB
    #edi


  • 2.  RE: Convert XML String to CSV Flat file

    Posted Tue November 18, 2008 04:42 PM

    Your task will be little more involved than just calling a service. You’ll use several.

    Read through the documentation about processing XML. And read the flat-file schema guide. The information there should be enough to get you started.


    #edi
    #webMethods
    #Integration-Server-and-ESB


  • 3.  RE: Convert XML String to CSV Flat file

    Posted Thu December 18, 2008 05:55 PM

    Hi

    Any one help me pls, this is urgent
    As per our requirement I am converting xml doc to csv file.If any tags missing in xml doc then csv file will missing the separator.

    ex:
    xml file :

    10 Luo 26

    CSV File:
    10,Luo,26

    if xml missed one tag like

    10 26

    Current CSV File: 10,26
    Excepted CSV File : 10,26

    If you have any idea on this Pls share me ASAP

    Cheers,
    Sashi.


    #Integration-Server-and-ESB
    #webMethods
    #edi


  • 4.  RE: Convert XML String to CSV Flat file

    Posted Thu December 18, 2008 06:58 PM

    Use the field positioning when you are declaring fields in schema. you can find the option of fixed position in property window. I think this solution should work. If i find any other information i will keep you posted.

    you can refer to schema documentation for more info.

    Regards,
    Mangat Rai


    #edi
    #Integration-Server-and-ESB
    #webMethods


  • 5.  RE: Convert XML String to CSV Flat file

    Posted Thu December 18, 2008 07:01 PM

    You should use the NthField (Index 1,2,3,4…) option in the FFSchema when you create FieldDefinitions for parsing/converting to CSV format…

    HTH,
    RMG


    #Integration-Server-and-ESB
    #edi
    #webMethods


  • 6.  RE: Convert XML String to CSV Flat file

    Posted Fri December 19, 2008 08:53 AM

    When you create flat file schema. In Flat file structure while declaring field definition, you need to provide set Extractor property. Use Nth field option Field = (0,1,2 etc…)
    this way if you get missing tag in XML, even then it will place a comma for that field place.


    #Integration-Server-and-ESB
    #webMethods
    #edi


  • 7.  RE: Convert XML String to CSV Flat file

    Posted Fri December 19, 2008 02:53 PM

    Mangatrai,

    You are on the right track…we are trying to answer your original question and hope you got the solution now that you have requested for…

    HTH,
    RMG


    #edi
    #Integration-Server-and-ESB
    #webMethods