How to scrap word from naked html text? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

How to scrap word from naked html text?

How to get this sentence print out to console?: "Build a future where people live in harmony with nature." I tried to create a code for ~8hours... but nothing works.... This is what I got so far: using System; using System.Collections.Generic; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using System.Xml; namespace printertrue { class Program { private void button_Click(object sender, EventArgs e) { string path = "https://www.w3schools.com/html/tryit.asp?filename=tryhtml_formatting_q"; System.IO.StreamReader theFile = new System.IO.StreamReader(path); string content = theFile.ReadToEnd(); theFile.Close(); HtmlAgilityPack.HtmlDocument doc = new HtmlAgilityPack.HtmlDocument(); doc.LoadHtml(content); var myDiv = doc.DocumentNode.SelectNodes("//'html[@'body/p[2]/q']"); } static void Main(string[] args) { } } }

6th Nov 2018, 2:04 PM
Shaitzu15
Shaitzu15 - avatar
1 Answer