Get a value of an attribute by XPath and HtmlAgilityPack

you can get it in .Attributes collection:

var doc = new HtmlAgilityPack.HtmlDocument();
doc.Load("file.html");
var node = doc.DocumentNode.SelectNodes("//input") [0];
var val = node.Attributes["value"].Value; //10743

Leave a Comment