老是乱杀啊!!!
把我刚编译的文件都杀了,我晕!!!
C:\Users\t\Documents\Visual Studio 2010\Projects\ConsoleApplication2\ConsoleApplication2\bin\Debug
相关进程 C:\Windows\SysWOW64\cmd.exe
源代码如下:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;
namespace ConsoleApplication2
{
class Program
{
static void Main(string[] args)
{
string xml = @"<xml><ToUserName><![CDATA[gh_a41b890e4]]></ToUserName>
<FromUserName><![CDATA[oa3yYjsXcDwDSx84984dUG4hmg]]></FromUserName>
<CreateTime>1387962194</CreateTime>
<MsgType><![CDATA[text]]></MsgType>
<Content><![CDATA[jzjd]]></Content>
<MsgId>5961252231324420502</MsgId>
</xml>";
XmlDocument document = new XmlDocument();
document.LoadXml(xml);
XmlNodeList list = document.GetElementsByTagName("xml");
if (list[0]["aaaa"] == null)
{
Console.WriteLine("null");
}
Console.WriteLine("{0} - {1}", list[0]["FromUserName"].Name, list[0]["FromUserName"].InnerText);
}
}
}
赶紧修复下,我开发都不能搞了,太差了
用户系统信息:Mozilla/5.0 (Windows NT 6.1; WOW64; rv:26.0) Gecko/20100101 Firefox/26.0