Home Page › Forums › BizTalk 2004 – BizTalk 2010 › debatching a schema into xml’s in expression shape
- This topic has 5 replies, 1 voice, and was last updated 9 years, 2 months ago by
community-content.
-
AuthorPosts
-
-
March 9, 2009 at 9:11 PM #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
-
March 11, 2009 at 12:46 AM #21882
Hi
Try this link http://www.biztalkgurus.com/media/p/15489.aspx
it may be exactly what you need.
Wonder
South Africa
-
March 11, 2009 at 6:04 AM #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
-
March 11, 2009 at 6:45 AM #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);
-
March 11, 2009 at 1:14 PM #21899
If I select a Record in the xpath expression do I get the elements and there values under it .
-
March 11, 2009 at 1:39 PM #21901
so if I do this will it work to get the header record and the element values under it?
Variable_1 = System.Convert.ToString(xpath(SQLMessage, “Count(/*[local-name()=’TEMS_SQL’ and namespace-uri()=’http://TEMSInt.Schemas.TEMS_SQL’%5D/*%5Blocal-name()=’Record’ and namespace-uri()=’http://TEMSInt.Schemas.TEMS_SQL’%5D/*%5Blocal-name()=’Header’ and namespace-uri()=’http://TEMSInt.Schemas.TEMS_SQL’%5D)”));
Thanks
-
-
-
-
-
AuthorPosts
- The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.