Flat File 2 XML

Home Page Forums BizTalk 2004 – BizTalk 2010 Flat File 2 XML

Viewing 1 reply thread
  • Author
    Posts
    • #25175

      Hello.

      I built an application which read a flat file (.txt) put it thru a pipeline isdoing a mapping and send it in a folder as an XML-File. It works so far. My first Appliction and I’m glad that it works! 😉

      The problem is, in the source file (.txt) I have more than one datasets (each line per dataset). In the XML-file I get just the first one.

      Perhaps someone could let me know what I have to do to get ONE XML-file for each dataset?!

      The Flat File looks like this – .txt:

      Lastname;Firstname;Street; …

      Lastname;Firstname;Street;… 

      The XML Output looks like – .XML:

      <Root>

          <Lastname>xxxxx</Lastname>

          <Firstname>xxxxx</Firstname>

          <Street>xxxxx</Street>

      </Root>

      Now I need for each row in the .txt a separat xml-file.

      Thank you very much in advance.

      best regards

      Wolfgang

    • #25177

      Hi Wolfgang,

       

         Have you looked into calling a Receive pipeline inside your orchestration to achieve your goal? Here’s a BizTalkGurus blog on this subject:

      http://www.biztalkgurus.com/blogs/biztalk/archive/2005/06/16/How-To-Call-A-Receive-Pipeline-In-an-Orchestration.aspx

       

         Daniel.

       

      • #25181

        Hi Daniel,

        thanks a lot for your fast reply.

        I’m not sure if this a solution I’m looking for. I’m looking for a solution to loop through ONE textfile with multiple datasets in it. I’m new to BTS 2009, but is there no way in a pipeline to say something like that:

        Identifier (each row starts with it), value 1, value 2, value 3 …

        And when the disassambler (?) read the textfile it knows by each same identifier it has to build a new xml file. I think something like this should works fine for me – if BTS provides a method like this, does it? (So I wouldn’t need an Orchestration so far)

        Thanks

        Wolfgang  

        • #25185

          Hi Wolfgang,

           

             You are most likely looking to do message debatching inside a custom pipeline. Here’s a blog you can consult more information (though it was written for BizTalk 2006 but I think it’s still relevant for version 2009):

           

          http://geekswithblogs.net/benny/archive/2006/02/05/68249.aspx

           

             Cheers,

           

             Daniel.

           

          • #25198

            Hi Daniel.

             

            Thanks a lot for your help an answer.

            It works fine so far.

            Now I can debatch out of one txt with multiple rows multiple xml files! [Y]

            Thanks again

            Wolfgang

            • #25199

              One more question:

              Is it possible to use a mapping between the debatched TXT and the outcoming xml file?

              The reason why is, I have one output schema for the xml and I have to map all debatched values coming out of the txt file in this xml output schema. So I have at the end multiple xml files, depands on the how many rows I have in the txt file.

              I tried to insert a inbound map for mapping, but I get no result.

              Anyone know how I can handle this?

              Thanks in advance

              Wolfgang   

              • #25200

                Hi Wolfgang:

                 

                   If you are trying to map each row coming from the debatched TXT file to the XML output schema, you should place your map in the Send Port (in BizTalk Administration Console), under Outbound Maps section, just make sure your source and target schemas match up with the expected message types.

                 

                   Daniel.

                 

                • #25207

                  Hello Daniel.

                   

                  It works great!

                  After I placed the map, as you told me, in the Send Port, I changed the “Send pipeline” to “XML Transmit” as well.

                  Thanks again for your great help! [Y]

                  Wolfgang 

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