L
Looch
Can anyone tell me what's wrong with the syntax of the XPath query in
the SelectSingleNode parameter?
I keep getting an "Object reference not set to an instance of an
object" error. I've tried none, one and two forward slashes in front
of 'soap:Envelope' and still the same message. (The last commented out
line works so I know the response is well formed/correct).
XmlNamespaceManager nsmr = new XmlNamespaceManager (xdoc.NameTable);
nsmr.AddNamespace ("soap","http://schemas.xmlsoap.org/soap/
envelope/");
XmlNode = result;
XmlElement root = xdoc.DocumentElement;
result = root.SelectSingleNode("/soap:Envelope/soap:Body/
HelloWorldResponse/HelloWorldResult",nsmr);
txtResultValue.text = result.InnerXml;
//txtResultValue.Text =
xdoc.DocumentElement.FirstChild.FirstChild.FirstChild.InnerXml;
Thanks in advance.
the SelectSingleNode parameter?
I keep getting an "Object reference not set to an instance of an
object" error. I've tried none, one and two forward slashes in front
of 'soap:Envelope' and still the same message. (The last commented out
line works so I know the response is well formed/correct).
XmlNamespaceManager nsmr = new XmlNamespaceManager (xdoc.NameTable);
nsmr.AddNamespace ("soap","http://schemas.xmlsoap.org/soap/
envelope/");
XmlNode = result;
XmlElement root = xdoc.DocumentElement;
result = root.SelectSingleNode("/soap:Envelope/soap:Body/
HelloWorldResponse/HelloWorldResult",nsmr);
txtResultValue.text = result.InnerXml;
//txtResultValue.Text =
xdoc.DocumentElement.FirstChild.FirstChild.FirstChild.InnerXml;
Thanks in advance.