debatching a schema into xml’s in expression shape

Home Page Forums BizTalk 2004 – BizTalk 2010 debatching a schema into xml’s in expression shape

Viewing 1 reply thread
  • Author
    Posts
    • #21865

      Hi I have scenerio where biztalk receives a message and transformed to another message, so now the message is of type schema which has 3 records under a root node and now i have to debatch these 3 records into 3 different xml’s and then i need to submit to a .net component, so how will I acheive this in the expression shape, can anyone reply to this with a sample code.

       

      Thanks

    • #21882

      Hi

      Try this link http://www.biztalkgurus.com/media/p/15489.aspx

      it may be exactly what you need.

      Wonder

      South Africa

      • #21891

        Hi For me the project in the zip file is not working it say projects unavailable I just need the code in the expression shape on how to create a xml document for a record from the original message.

         

        Thanks

        • #21892

          you will have to create nLoopCount and nRecordCount as integer variables. sXPath as a string

          On the expression shape, get the number of records

          nRecordCount = System.Convert.ToInt32(xpath(msg, “count(//item)”));

          “msg” being the main message  and “item” being the record;

          drop the loop shape below the expression

          The loop expression should be: nLoopCount <= nRecordCount

          Drop the message assignment within the loop. create the single message and do what you want with it.

                     sXPath = System.String.Format(“//Data[{0}]”,nLoopCount);

                     SingleInput = xpath(Input, sXPath);

           

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