Reputation: 2871
My application uses HtmlAgilityPack to download HTML documents and analyze their DOM structure with a lot of XPath queries. Disclaimer: XPath support is extremely important for my purposes, I cannot switch to CSS selectors, for example. This is the main (and, probably, the only) reason why I use HtmlAgilityPack.
I have an HtmlAgilityPack.HtmlNode
, chosen from a HTML document with some XPath query. Now I need to implement one additional method: What would be the bounding box coordinates of this element, if it was rendered by some engine? I don't even care which particular engine is used, let it be WebKit, MSIE, Gecko/Firefox etc. I just need a way to:
HtmlAgilityPack.HtmlDocument
that I already have.HtmlAgilityPack.HtmlNode
) on this canvas.I already spent half a day looking into various HTML rendering engines for .NET but still haven't found a way to do this. Maybe someone has already solved a similar problem? Thank you for any help.
Upvotes: 2
Views: 945
Reputation: 2276
You can try to add custom attribute. Then find it in WebBrowser control.
Something like this.
Upvotes: 2