TechTalkz.com Logo

Go Back   TechTalkz.com Technology & Computer Troubleshooting Forums > Tech Support Archives > Microsoft > Microsoft BizTalk Server

Notices

XPATH Error

Microsoft BizTalk Server


Reply
 
Thread Tools Display Modes
Old 26-11-2007, 08:30 PM   #1
Sue
Guest
 
Posts: n/a
XPATH Error

Hello everyone,

I was trying to do extract all nodes of particular name and assign o
XMLdocument objetc. When i tried inside the MessageAssignment Shape it is
throwing the Type cst error. Can any one let me know where i need to do
changes.

Please find the code that im trying

XPathString = System.String.Format("//Order[{0}]",ScatterLoopCount);
XMLDOM = xpath(ShippingOrderMsg,XPathString + "/*[local-name()='ItemInfo']");
System.Diagnostics.EventLog.WriteEntry("BizTalk Server Ex",
System.String.Format("Item Detail from XPath Query = {0}", XMLDOM.InnerXml));
ShippingDetailMsg = XMLDOM;
ShippingDetailMsg(XMLNORM.AllowUnrecognizedMessage )=true;
ScatterLoopCount = ScatterLoopCount +1;

here i would like to extract all the Node of type ItemInfo and assign to the
XmlDocument object. BizTalk is throwing TypeCast error. Do i need to use
Text() function of XPATH.

Thanks in advance

Cheers
  Reply With Quote
Old 27-11-2007, 09:32 PM   #2
Kerrey Zheng
Guest
 
Posts: n/a
RE: XPATH Error

check the value of XPathString, try to use
xpath("/*[local-name()='Order']/*[local-name()='ItemInfo'"] for a testing
first, if not work still, then you should check namespace issue.

"Sue" wrote:

> Hello everyone,
>
> I was trying to do extract all nodes of particular name and assign o
> XMLdocument objetc. When i tried inside the MessageAssignment Shape it is
> throwing the Type cst error. Can any one let me know where i need to do
> changes.
>
> Please find the code that im trying
>
> XPathString = System.String.Format("//Order[{0}]",ScatterLoopCount);
> XMLDOM = xpath(ShippingOrderMsg,XPathString + "/*[local-name()='ItemInfo']");
> System.Diagnostics.EventLog.WriteEntry("BizTalk Server Ex",
> System.String.Format("Item Detail from XPath Query = {0}", XMLDOM.InnerXml));
> ShippingDetailMsg = XMLDOM;
> ShippingDetailMsg(XMLNORM.AllowUnrecognizedMessage )=true;
> ScatterLoopCount = ScatterLoopCount +1;
>
> here i would like to extract all the Node of type ItemInfo and assign to the
> XmlDocument object. BizTalk is throwing TypeCast error. Do i need to use
> Text() function of XPATH.
>
> Thanks in advance
>
> Cheers

  Reply With Quote
Old 27-10-2008, 11:18 PM   #3
Newbie
 
Join Date: Oct 2008
Age: 41
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0 erojaso is an unknown quantity at this point
Re: XPATH Error

have you found the issue?
I have a similar problem, I can't access de datas into the detail item

Quote:
Originally Posted by Sue View Post
Hello everyone,

I was trying to do extract all nodes of particular name and assign o
XMLdocument objetc. When i tried inside the MessageAssignment Shape it is
throwing the Type cst error. Can any one let me know where i need to do
changes.

Please find the code that im trying

XPathString = System.String.Format("//Order[{0}]",ScatterLoopCount);
XMLDOM = xpath(ShippingOrderMsg,XPathString + "/*[local-name()='ItemInfo']");
System.Diagnostics.EventLog.WriteEntry("BizTalk Server Ex",
System.String.Format("Item Detail from XPath Query = {0}", XMLDOM.InnerXml));
ShippingDetailMsg = XMLDOM;
ShippingDetailMsg(XMLNORM.AllowUnrecognizedMessage )=true;
ScatterLoopCount = ScatterLoopCount +1;

here i would like to extract all the Node of type ItemInfo and assign to the
XmlDocument object. BizTalk is throwing TypeCast error. Do i need to use
Text() function of XPATH.

Thanks in advance

Cheers
erojaso is offline   Reply With Quote
Reply

Thread Tools
Display Modes



< Windows Help - MS Office Help - Hardware Support >


New To Site? Need Help?

All times are GMT +5.5. The time now is 11:23 AM.


vBulletin, Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO
Copyright © 2005-2009, TechTalkz.com. All Rights Reserved - Privacy Policy
Valid XHTML 1.0 Transitional