XPath queries using HtmlAgilityPack fails to select notes with self closing tags
I'm trying to query all input nodes. All of the nodes that are not self-closing are being returned fine, but the nodes that are self-closing are not. Is there a way to address this that doesn't require me to changes the HTML?
开发者_JAVA百科Thanks!
This is the default behavior. If you want to change it, you need to play with the ElementFlags
collection, and for example, just remove INPUT from it, just like I explained for OPTION on a similar question here on SO: XHTML Parsing with HTMLAgilityPack
精彩评论