I am using HTMLAgilityPack and I want document in such a way as it appears on website. Mean if an html element has visibility: display:none, I dont want that node in my document.
I there any way to exclude such nodes having visible:none or hidden??
e.g.
<div class="changeodlabel" style="display:none;"><span class="default">Should not be in document html</span></div>
<div class="changeodlabel" ><span class="default">Should be in document html</span></div>
Html Agility Pack has no notion of what CSS and Javascript mean, as such it just parses the HTML and let's you decide what to do with it. If you want the page to be fully evaluated before grabbing the contents you'll need a more advanced HTML parser. Awesonium comes to mind. Or you can wrap PhantomJS (check out the ChutzPah sources to see how that can be done).