xPath error

#13206

Thanks for your advice:
Now I have changed it to

[color=blue:f19eb68538]XPathStatement = System.String.Format(\”/*[local-name()=’Sample’ and namespace-uri()=’http://BizTalkOrch.InPutSchema’%5D/*%5Blocal-name()=’Body’ and Position()=1 and namespace-uri()=”]\”);
xDoc = xpath(InMsg, XPathStatement);[/color:f19eb68538]

But Now I am getting the following error:

[color=red:f19eb68538]System.FormatException: Index (zero based) must be greater than or equal to zero and less than the size of the argument list.
at System.Text.StringBuilder.AppendFormat(IFormatProvider provider, String format, Object[] args)
at System.String.Format(IFormatProvider provider, String format, Object[] args)
at BizTalkOrch1.XPath.segment1(StopConditions stopOn)
at Microsoft.XLANGs.Core.SegmentScheduler.RunASegment(Segment s, StopConditions stopCond, Exception& exp)
System.FormatException
Scoped@
XPath.XPath
ea9527c1-8a78-47d6-ad83-3f8e058936a7[/color:f19eb68538]

Please note that I have tried with both position 0 as well as 1 but the error remain the same.

regards,