RE: Problem using XPath selectSingleNode after receiving xml document
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > BizTalk Server > BizTalk Server Orchestration > RE: Problem using XPath selectSingleNode after receiving xml document




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    RE: Problem using XPath selectSingleNode after receiving xml document  
Alan Smith


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
10-18-04 12:46 PM

Hi John,

You could try adding some debuc code, just to double check that you are
getting the XPath stuff right.

Try:
System.Daignostics.Debug.WriteLine (aSalesOrders[i].OuterXml);
in the loop, then run the orchestration with VisualStudi attached to the
BizTalk service. This should give you some insite as to what's going on in
the orchestration.

Regards,

Alan


"John Smith" wrote:

> Hi,
>
> I have a serious problem using xpath queries after receiving a xml documen
t
> with a .Net class. I use an Expression shape to initialize my class and us
e
> a method to send the received message to this class.
>
> Everything works fine until i want to use a XPath query to select some
> nodes. I get a null reference to a node, though I know it exists. If I use
> the same code, but then loading the xml document from the file system I ha
ve
> no problems!
>
> Does anybody has an idea?
>
> This is a part of my code:
>
> aXmlDoc = (XmlDocument) msg[0].RetrieveAs(typeof(XmlDocument));
> aSalesOrders = aXmlDoc.DocumentElement.ChildNodes;
>
> for (int i=0;i<aSalesOrders.Count;i++)
>
> {
>
> aTo = aSalesOrders[i].SelectSingleNode("ShipTo/Name").InnerText;
>
>
>
> Thanks,
> Bas Dirkse (b_dirkse@hotmail.com)
>
>
>
>





[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 12:38 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register