Поместите черту между каждым третьим символом

Вам должно быть довольно просто получить то, что вам нужно с HtmlAgilityPack. Предполагая, что ваш документ загружен в объект HtmlDocument с именем doc:

HtmlNodeCollection collection = doc.DocumentNode.SelectNodes("//a[@href]");

foreach (HtmlNode node in collection)
{
    // Do what you want with the href value in here. As an example, this just
    //  just prints the value to the console.
    Console.WriteLine(node.GetAttributeValue("href", "default"));
}
13
задан MattCan 8 December 2011 в 03:12
поделиться