您的位置:首页 > 其它

当xml里面有命名空间的时候去读问题

2013-04-03 06:37 453 查看
< ![CDATA[http://www.dradio.de/rss/nachrichten rss 地址



用平常的方法读取 ,



会不行.so .

换了个方法读取



就行了.或者用这个方法(未测试)

XmlNamespaceManager mgr = new XmlNamespaceManager(xmlDoc.NameTable);
mgr.AddNamespace("x",
"http://schemas.openxmlformats.org/officeDocument/2006/extended-properties");foreach (XmlNode node in xmlDoc.SelectNodes("//x:Template", mgr)){
Console.WriteLine("{0}: {1}", node.Name, node.InnerText);}


  

]]>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: