Scribe Insight - XML with repeating nodes in a nutshell

In my daily work I run into integration projects where xml files are exchanged between source and target systems. In some situations you will have more complex xml structures, which contains repeating nodes. The process is simple, we basically loop several times through the source file.

In this post a method is described how you can configure your xml with repeating with Scribe Insight.

You start with your xml and create associated xsd schema (this is optional) with your xml software like Visual Studio or XML spy or other flavor :-)

Example customer xml file
 The next step would be to configure a new connection in the Work Bench for your xml file, of course this is only the sample file. For integration the contents will change e.g. its dynamic. Keep in  mind that you will need to change this files too as some fields are added or removed from the source.

In the following screenshots you see the steps you have to take. In short you open the connection manager, choose for XML > dynamic > Select your xml and xsd. The files should be located in your collaboration folder.
Example customer xsd file

After your connection has been created you can define connection to  your target. In this example I used a custom table in Scribe Internal database called customers. When you define your source a window will popup where you can define your repeating node(s).

Ok, here is the flow in screenshots..... just like your TV at home :)

Add Connection > Choose XML
Use as Source

Its dynamic :-)

Choose your files e.g. xml & xsd (in this case)

Your connections

 At this time you did configure your connections, when you Configure Source (see screenshot below), you will go to XML and select the Customer node of your xml. A new window will popup where you can define your repeating node(s)

Configure your source
Here the magic happens :)

After your created your source, target and mappings, just hit the "Test Run" button and in my case you would loop three times through the xml file.

Your basic mapping
first run

second run

third run

No where to run :)

This is in nutshell how you could loop through your source XML file with repeating nodes.

Happy happy happy repeating repeating repeating :)


Unknown said…
Cool blog.Nice post,thanks for sharing this useful article.

Dynamics CRM Developers