BizTalk Server Orchestration - RE: Problem using XPath selectSingleNode after receiving xml document

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server Orchestration > October 2004 > RE: Problem using XPath selectSingleNode after receiving xml document





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

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

2004-10-18, 7:46 am

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 document
> with a .Net class. I use an Expression shape to initialize my class and use
> 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 have
> 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)
>
>
>
>

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com