Is it possible to use XPath with .NET, without using any external libraries? Is it natively supported, and can it parse “invalid HTML” (such as tags not being closed etc)?
I would really hate to have to use regular expressions for this, as clearly stated here: RegEx match open tags except XHTML self-contained tags
I’ve also had bad experiences with regular expressions when it comes to HTML parsing.
Yes, XPath is natively supported. No, it will not parse tag soup. You’ll probably want to use the HTML Agility Pack for that instead.