Silverlight中的RSS XML错误 [英] RSS XML error in Silverlight
本文介绍了Silverlight中的RSS XML错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我目前正在开发Silverlight WP7应用程序,该应用程序从互联网上下载RSS/XML提要,并且每次在包含"georss:point"字段的情况下运行它时,都会收到以下错误消息:
I am currently developing a Silverlight WP7 application that downloads an RSS/XML feed from the internet and everytime I run it with the "georss:point" field included I get the following error message:
<br />
Exception {"The '':'' character, hexadecimal value 0x3A, cannot be included in a name."} System.Exception {System.Xml.XmlException}<br />
是否有人对如何下载其中带有:"的XML字段有任何想法?
这是我的代码,当我将"georss:point"行作为注释并在XAML中删除该字段的数据绑定时,它可以正常工作.
Does anyone have any ideas on how you can download XML field that have the ":" in them?
Here is my code which works fine when I put the "georss:point" line as a comment and remove the databinding for that field in the XAML.
private void scanDownloadStringCompleted(object sender, DownloadStringCompletedEventArgs e)
{
if (e.Error != null)
return;
XElement xmlScan = XElement.Parse(e.Result);
listBox1.ItemsSource = from channel in xmlScan.Descendants("item")
select new ScanItem
{
title = channel.Element("title").Value,
//georss = channel.Element("georss:point").Value,
description = "Position: " + channel.Element("description").Value
};
}
推荐答案
查看此 ^ ]线程.他们有确切的问题.
Look at this SO [^]thread. They had exact issue.
这篇关于Silverlight中的RSS XML错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文