How to parse single xml node in windows phone

无人久伴 提交于 2019-12-20 07:08:48

问题


<root>1234</root>

how do I pasrse this single xml node and it comes from web service response, I am using:

void webservice_completedeventArgs()
{
XDocument doc = XDocument.Parse(e.Result);
}

this code runs very well in Emulator but in device when I debug, I am getting this error:

"Data at Root level is invalid"

I think its happening due to, There is no XML Dclaration in web service response like

"<XML Version 1.0 Encoding UTF-8?>"

So how do I parse that single XML node. Please any help would be greatly appreciated

来源:https://stackoverflow.com/questions/22789893/how-to-parse-single-xml-node-in-windows-phone

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!