C# - Get the text inside tags using HTML Agility Pack
问题 I have used the following code to parse HTML document & store it as CSV file. string actuald=null; string data1 = File.ReadAllText("E://text.html"); HtmlDocument doc = new HtmlDocument(); doc.LoadHtml(data1); HtmlNodeCollection col = doc.DocumentNode.SelectNodes("//pre"); foreach (HtmlNode node in col) { actuald=node.Attributes[""].Value; } File.WriteAllText("E://text.csv",actuald); Console.WriteLine("Data Converted"); Console.ReadKey(); in the html document, the content i need to extract