Taking this simplifed example of my XML:
You're missing the XML namespace defined by the <message>
node in your SelectSingleNode
call. Assuming oss
is an XmlDocument
instance, you need to do this:
XmlNamespaceManager nsMgr = new XmlNamespaceManager(oss.NameTable);
nsMgr.AddNamespace("ns", "http://www.mydomain.com/MyDataFeed");
XmlNode errorNode = oss.SelectSingleNode("/ns:message/ns:error", nsMgr);
Marc