How to write loop over subelements in the message

Home Page Forums BizTalk 2004 – BizTalk 2010 How to write loop over subelements in the message

Viewing 1 reply thread
  • Author
    Posts
    • #14512

      I can promote fields, but by this i can gain access only to non repeatinf elements and attributes. How can i implement someting like

      foreach(XmlElement childrecord in Message_1.SelectNodes(\”//childrecords\”))
      {
      // something like send notification to expert, whose email is in childrecord.GetAttribute(\”email\”)
      }

    • #14513

      Sergey,

      For simple scenarios, you can use a for-loop combined with the xpath() function inside an expression shape to get each element and process it. (basically you simply change the index in the xpath expression according to an iteration index)

      For more advanced scenarios, you can apply a technique similar to the one presented in Stephen Thomas’ sample on debatching inside an orchestration (http://www.biztalkgurus.com/Samples/Debatch-Smaller-Batch-Orchestration.html).

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