views:

14

answers:

1

Hi,

Relatively new to Biztalk; I could use seasoned help.

I'm faced with having to try to map a source XML document to a flat-file TAB delimted destination. My source document has some nested nodes that I need to iterate through and translate them each as a row on the flat-file document; classic sales order header/detail relationship. The results would need me to repeat the header information for every nested element in the child node.

I've tried a solution using a looping functoid but I'm not sure how to represent the destination list correctly. Am I missing the obvious? At what destination row element should I link my "Looping" output param to?

For demonstration sake here's an example of the schemas I'm working with.

SOURCE SCHEMA (Don't have the possibility to modify the source structure)

  • schema\
  • salesorders\
  • salesorders\orders\
  • orders\soid
  • orders\cust name
  • orders\address
  • orders\detail\
  • orders\detail\msrp
  • orders\detail\modelno
  • orders\detail\sku

DESTINATION SCHEMA

  • schema\
  • \root\
  • soid
  • custname
  • address
  • etc...

Flat file OUTPUT (One line per detail item)

  • soid custname address msrp modelno sku
  • soid custname address msrp modelno sku

Anybody could orient me in right direction?

Much appreciated!

A: 

You'll link your Looping Functoid from the source node you want to have generate a new record to (usually) the outer-record node (usually first child of the Root, but not always) of the destination. This will basically tell the map "Every time you see a new blah in my source, create a whole new record in my destination."

AllenG
Hi, thank-you for answering.I've attempted to link source "salesorders\orders" node to my "looping" functoid and then the functoid to the first child of the record. I still am not able to reproduce x number of lines per x number of child elements. So basically referring to my sample schemas; I drag/drop orders/soid to my functoid and then drag/drop a connection from the functoid to node \root\soid. No luck :(
S.Ruscitto
is your destination schema set up for a looping structure? Remember that in the Schema, the Root refers (more or less) to the file. So based on what I'm seeing you have a single record schema there. What I would expect is a Child Record of Root called 'Order' which would then have child elements/attributes of SOID, custName, etc. 'Order' would be set to Min Occurs = 1, Max Occurs = Unbounded. You'd then hook your looping functoid to the 'Order' node.
AllenG