To showcase the parsing code I’ve written, I now have a demo app which allows you to view the structure of pages, not unlike the debuggers in MS Edge, Chrome etc. For example:
It’s not perfect, and doesn’t parse all pages perfectly (Google being a good example….), but it does pretty well on most pages, and I am still improving the underlying parsers.
If you’d like to get hold of the source code or like the parsers as a library, then feel free to contact me, and we can discuss your educational or research use, or negotiate licensing terms.