![]() |
|
|
#1 |
|
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 |
|
|
|
#2 |
|
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 |
|
|
|
#3 | |
|
Newbie
Join Date: Oct 2008
Age: 41
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
![]() |
Re: XPATH Error
have you found the issue?I have a similar problem, I can't access de datas into the detail item Quote:
|
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
< Windows Help - MS Office Help - Hardware Support >
| New To Site? | Need Help? |