How to get a link's title and href value separately with html agility pack?

后端 未结 3 951
长发绾君心
长发绾君心 2021-01-27 23:37

Im trying to download a page contain a table like this

Name
3条回答
  •  渐次进展
    2021-01-28 00:19

    I can't test it right now, but it should be something among the lines of :

        string name= namenode.Element("a").Element("b").InnerText;
        string url= linknode.Element("a").GetAttributeValue("href","unknown");
    

提交回复
热议问题