I am having trouble parsing the following XML in C#, because of the "xmlns" attribute in the root.
<CaptureResponse xmlns="http://ift.tt/1xG5c9U">
<CaptureResult>
<State>Open</State>
</CaptureResult>
</CaptureResponse>
How would I, for example, check for the existence of the element in C# with the above xml? The below does not work.
XmlDocument doc = new XmlDocument();
doc.LoadXml(response);
if (doc.SelectSingleNode("CaptureResponse") != null)
{}
No comments:
Post a Comment