The xpath function is quite neat, you can use it in expression shapes for both getting and setting data. Here is an example:
xpath(AggregatedMessage, “/*[local-name()='EFACT_D95B_COARRI_ITG12' and namespace-uri()='http://schemas.microsoft.com/BizTalk/EDI/EDIFACT/2006']/*[local-name()='UNT' and namespace-uri()='']/*[local-name()='UNT2' and namespace-uri()='']“) = xpath(AggregatedMessage,”count(//UNH)”);
This expression sets the element UNT2 (using the xpath expression above) in the message AggregatedMessage to a calculated value of UNHs. As you see, you may use xpath functions in your call, here I used the count() function. For getting a value of a node, simply used the function string(), for instance this could look like: receiverId = xpath(ContainerAnnouncement, “string(//UNB/S003_0010″);
[...] Using the xpath function in BizTalk expression shapes for getting and setting data June 2009 [...]