I need to find elements in an HTML string. Unfortunately, HTML is pretty badly broken (for example, it closes tags without a pair of openings).
I tried using XPath with startpad.net/xmlpath, but it cannot parse the HTML file, so damn the error.
How can I find elements in broken HTML with golang? I would prefer to use XPath, but I am also open to other solutions if I can use it to search for tags with a specific identifier or class.
html go xpath
mimrock
source share