:
Dictionary<string, string> values = new Dictionary<string, string>();
string key, date;
HtmlDocument doc = Load(html);
HtmlNode node = doc.DocumentNode.SelectSingleNode(".//table[@class='pricing detail']");
foreach(HtmlNode child in node.SelectNodes(".//tr[@class='left']")
{
date = child.GetInnerText;
}
foreach(HtmlNode child in node.SelectNodes(".//tr")
{
if(child.Attributes.contains("class"))
{
key = child.GetInnerText;
}
else
{
values.Add(key, child.GetInnerText);
}
}
.
:
, foreach() , <tr>. , , node (.. node <table class="pricing detail">. , node ( GetInnerText), ( ). , node , , .
, ,
, . , , , , , .
foreach: , ( ). , , , , .
... HTML. ... -, - , . , , , , , , ,... funner... . -, , , htmlagilitypack. , .