BizTalk Gurus

Error using XPath

rated by 0 users
Answered (Not Verified) This post has 0 verified answers | 2 Replies | 1 Follower

posted on Tue, May 26 2009 1:07 PM

Hi,

I am trying to use System.XML.Xpah() inside expression shape, but biztak is throwing error:

'Xpath is not a function' on the statement itsef.

Thanks in advance.

All Replies

Top 10 Contributor
185 Posts
Siva replied on Wed, May 27 2009 1:23 PM

I guess you dont need to put "System.XML".

I used something similar to this

Declare variable countInvoices - Int type

Then i have to following in the expression shape

val = System.Convert.ToInt32(xpath(MessageName,"count(path of node)"));

Siva

Thank you, Siva
Not Ranked
2 Posts
Answered (Not Verified) niklas replied on Thu, May 28 2009 5:33 AM
Suggested by dino fassis 3

Hi there!

Try the following syntax to set a value:

xpath(Msg_Message, "//*[1]/*[local-name() = 'Header']/*[local-name() = 'Value']") = varValue;

Or the following syntax to get a value:

varValue = xpath(Msg_Message, "string(//*[1]/*[local-name() = 'Header']/*[local-name() = 'Value']/text())");

//Niklas

Page 1 of 1 (3 items) | RSS