HTML Parser

Yes, you can use the XML component to parse HTML. HTML is invalid XML (because it does not require closing tags, among other reasons), so you'll need to be sure to set the Validate property of the XML component to false.

To parse HTML, simply provide the HTML data to the component via the InputData or InputFile properties, then call the Parse method. The events will begin firing immediately. StartElement will fire for each element opening tag, EndElement for each element closing tag, etc.

We appreciate your feedback.  If you have any questions, comments, or suggestions about this article please contact our support team at kb@nsoftware.com.