【发布时间】:2014-07-19 15:15:37
【问题描述】:
我试图解析这个网站的结果。 http://www.nokia.com/in-en/store-locator/?action=storeSearch&qt=madurai&tags=Nokia_Recycling_Point&country=IN
我特别需要 div 类“result-wrapper”的内容。也就是说,所有的 'h4'、'category' 和 'description' 跨度类。以下是我可以达到的代码,稍后我不知道要解析那个特定的 div。我需要帮助来获取该 div 类的所有内容。
protected async override void OnNavigatedTo(NavigationEventArgs e)
{
base.OnNavigatedTo(e);
string htmlPage = "";
using (var client = new HttpClient())
{
try
{
htmlPage = await client.GetStringAsync("http://www.nokia.com/in-en/store-locator/?action=storeSearch&qt=madurai&tags=Nokia_Recycling_Point&country=IN");
}
catch (HttpRequestException exc) { }
}
HtmlDocument htmlDocument = new HtmlDocument();
htmlDocument.LoadHtml(htmlPage);
【问题讨论】:
标签: c# windows-phone-8 html-parsing html-agility-pack