I just found out about html agility pack and I tried it, but stumbled upon a problem. I couldn't find anything on the web so I am trying here.
Do you know how I can load the HTML from a string instead of document/URL?
Thanks.
Have you tried using LoadHtml?
string htmlString = 'Your html string here...';
HtmlAgilityPack.HtmlDocument htmlDocument = new HtmlAgilityPack.HtmlDocument();
htmlDocument.LoadHtml(htmlString);
// Do whatever with htmlDocument here
i think there's a function to do that right?
HtmlDocument doc = new HtmlDocument();
doc.LoadHtml("<test>");
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With