我只是尝试将从html页面获取的值分配给字符串,但是在App.xaml.cs中的Application_UnhandledException方法失败了
虽然我是WP8的新手,但请帮助我理解原因并解决它。谢谢大家。
我的代码:
HtmlAgilityPack.HtmlNode imageNode = doc.DocumentNode.SelectSingleNode("//div[@class='fck_detail width_common']/table/img[@src]");
string imgUrl = imageNode.Attributes["src"].Value;
App.xaml.cs中的Application_UnhandledException失败
private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)
{
if (Debugger.IsAttached)
{
// An unhandled exception has occurred; break into the debugger
Debugger.Break();
}
}
答案 0 :(得分:0)
HtmlAgilityPack.HtmlNode.ElementsFlags.Remove("img");