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
John Smith

2004-10-16, 5:52 pm

Thanks for your reaction, but this was not really helpful, I'm sorry!

In your example you create an empty xmldocument. After that, you introduce
the variable xpath, of which I don't know the type. Is it a XPathNavigator?
Or a XPathNodeList?

Shouldn't I first create a XPathDocument?

Why does it work when I read the same file from the file system, and not if
I get the document through an Orchestration Expression. I noticed that the
document sent by biztalk has a lot of formatting with it, but that doesn't
seem to be the problem. I saved the xml document produced by biztalk to the
file system, and I had no problem processing the file.

This is the complete function call:

public void ProcesMsg(XLANGMessage msg)

{

XmlDocument aXmlDoc;

XmlNodeList aSalesOrders;

string aTo, aSubject, aBody, aAttachment;


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;

if (aTo.Length >0)

{

aBody = TransformXML(aSalesOrders[i],"mappingBody.xsl");

aSubject = "Uw Order";

aAttachment = TransformXML(aSalesOrders[i],"mappingAttachment.xsl");

System.Diagnostics.EventLog.WriteEntry("Confirmation Mail",aBody);

SendSMTPMail(aTo,aSubject,aBody,aAttachm
ent);

}

}

}


Best regards,
Bas Dirkse (b_dirkse@hotmail.com)


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com