Skip to content
aadnk edited this page Dec 21, 2011 · 8 revisions

This is a pretty fast HTTP/XML-parser written purely in Visual Basic from scratch. It is compliant with the DOM-standard, though it currently only up until DOM Level 1.

The project also include a DOM Inspector for browsing and editing a parsed document, plus a very simple example of how this parser might be utilized to make a limited web-browser control - without the use of IE or other browsers.

##Code Example Private Sub ProcessData(sData As String)

    Dim document As clsDocument
    Dim employeeNode As clsElement
    Dim nameNodes As clsNodeList

    ' Parse XML
    Set document = parser.ParseText(sData)

    lstCustomers.Clear

    For Each employeeNode In document.GetElementsByTagName("employee")
    
        Set nameNodes = employeeNode.GetElementsByTagName("name")

        If nameNodes.Lenght > 0 Then
            lstCustomers.AddItem nameNodes.Item(0).TextContent
        End If
    Next

End Sub

##Screenshot HtmlParser for VB6 - Screenshot (Thumbnail)

Clone this wiki locally