Loading HTML into HTMLDocument without using Webbrowser control
Is it possible to load HTML content into the HTMLDocument object without having to use the WebBrowser control? I have an html file stored locally that I want to parse in order to find out which checkboxes are on and which are off.
All of the examples I've found use the Webrowser. It just seems convoluted to have to use the WebBrowser in order to get to a DOM object.
Re: Loading HTML into HTMLDocument without using Webbrowser control
I think you need the xmldocument instead of htmldocument. An html document is just one type of xml document.
vb Code:
Dim xmldoc As New Xml.XmlDocument
xmldoc.Load("your filename here")
'do whatever you want to do with this document here
Re: Loading HTML into HTMLDocument without using Webbrowser control
No, it's not possible. So you have 2 options:
1. Use a WebBrower control (it doesn't have to be visible on your form).
2. Treat the html as text (that's what it is) and parse it using regex or string manipulation.
Re: Loading HTML into HTMLDocument without using Webbrowser control