Quantcast
Channel: htmlagilitypack Forum Rss Feed
Viewing all articles
Browse latest Browse all 655

New Post: Create HTML Document Object from HTML Source code

$
0
0
Are you trying to just grab the entire HTML source of that URL and put into a string file?

If so,
{
HtmlWeb webfile = new HtmlWeb();

// load your the html source from the desired website into HtmlDocument file

HtmlDocument doc = webfile.Load("http://www.YOURWEBSITE.com");

// since you want the entire HTML source as usable c# object, i.e. a string file
string websiteHTML = doc.DocumentNode.WriteTo();

}

You can print to console or to a text file to validate you got the source in its entirety (though I don't see why it wouldn't)

Hope that helps

Viewing all articles
Browse latest Browse all 655

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>