XML with repeating noded to Flat File

Home Page Forums BizTalk 2004 – BizTalk 2010 XML with repeating noded to Flat File

Viewing 2 reply threads
  • Author
    Posts
    • #25405

      I really thought this was going to be easy but…I have an XML file that I need to convert to a flat file.  Here is an example of what I need to do:

      XML file where nickname repeats unbounded:

      <People>

      <person>

              <nickname/>

             <nickname/>

      </person>

      </People>

       

      The output I need is a new line for each nickname that a person might have:

      John Smith, John

      John Smith, Johnny

      John Smith, Jo

      etc

      I’ve tried looping functiods in the map.  I do have the Flatfile assembler created, just can’t figure out how to handle the repeating elements.  Any clues?  Most examples out there are going flat file to XML.

      Thanks!

       

       

       

       

       

    • #25407

      Hi,

       

         I’ve built a sample according to your specs, and uploaded it to my account here in BizTalkGurus. Click on my avatar, go to My File section on the right and look for the zipped file named “People_Artifacts.zip”. Download it to your machine, and unzip it, it contains the following files:

      People_FF.xsd   (Flat file schema)

      People_XML.xsd   (XML schema)

      People_Map.btm   (Map)

      People_XML_output.xml    (XML test file used by Map for input instance)

      People_Map_output.txt     (Text test file used by Map for output instance)

       

         The artifacts were built using BizTalk 2006 R2 version, so you can easily convert them to version 2009.

       

         I hope this is a workable solution for you,

       

         Daniel.

       

      • #25409

        Wow – ask for a hint and get a solution.  Thank you very much for the effort.    I am having issues when I add multiple persons, but I can hopefully get it from here.    Again – thank you!

         

        • #25412

          Adjusted the schema and made people unbounded and now I’m rocking and rolling.  Thank you!

      • #25429

        I am having a similar difficultis – you don’t have a sample that generates a positional flat file for a complex do you? I’ve been beating my head for two days now.

        • #25436

          Hi,

           

             Do you have a sample data for your XML and Flat file? It’s difficult to figure out what you need without seeing the data first.

    • #50482
      biztalkgurus

        Foul is Fair • Hannah Capin • 9781250239549

    Viewing 2 reply threads
    • The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.