Need to make rows in a flat file into children in an XL file

Home Page Forums BizTalk 2004 – BizTalk 2010 Need to make rows in a flat file into children in an XL file

Viewing 1 reply thread
  • Author
    Posts
    • #16601

      I have two schemas, one for a flat file, one for an XML file. All I want to do is make the rows of the flat file into repeating children in the XML file. When I test it now, it only takes the FIRST record in my flat file. I want to repeat <tag1> data for each row in the flat file (see below). Am I missing something? Right now I'm just using two schemas and a map. Do I need the FFD in a pipeline? Even so, that'll treat each row as a separate message and I need my output to all be in the same XML file (not to mention that this will never bed used in an orchestration). I really need to keep this simple. For example:

       

      Flat

      ===

      1,a,2,b,3,c

      4,d,5,e,6,f

      ====

      XML Needed

      ====

      <root>

      <tag1>

      <tag2 att1="1" att2="a" att3="2"/>

      <tag3 att4="b" att5="3" att6="c"/>

      </tag1>

      <tag1>

      <tag2 att1="4" att2="d" att3="5"/>

      <tag3 att4="e" att5="6" att6="f"/>

      </tag1>

      </root>

       

      Any help would be greatly appreciated. Thanks in advance.

       

      Chris

    • #16602

      Subject line should read "XML file" Just wanted to make sure people didn't think I needed Excel help.

      • #16603

        Yes you need to use the FF disassembler. This component parses the flat file into Xml, which is nescessary if you wish to map it.

        If your input flat file schema has a record maxOccurs = 1 (default) then the flat file disassembler will break the file into individual records.

        If you wish to process as a whole file then you need to set the record maxOccurs = unbounded.

        You may also neede to use a looping functoid in your map, but this would depend on the structure of input and output. Sometimes the mapper will automatically loop if input and out records are both maxOccurs = unbounded. 

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