Struggling with parsing XML document properly (VB.NET)

I'm pants at vb.net but I was recently trying to write an app which accessed info from an .XML file. I don't know if this snippet would help you at all. =)

This is what i used to read some of the tags:

Code:
Sub updatedisplayBBC()
        'starts the XML reader
        Dim bbcTR As New XmlTextReader(bbcXMLf)

        'a loop to read through the XML file returning matches
        While bbcTR.Read
            If bbcTR.Name = "title" AndAlso bbcTR.NodeType = XmlNodeType.Element Then
                bbcList1.Items.Add(bbcTR.ReadString)
            End If
        End While
        'closes the XML reader
        bbcTR.Close()

        bbcDoc = New XmlDocument
        bbcDoc.Load(bbcXMLf)
    End Sub


"bbcList1" is a listbox, by the way. It gets populated with all the "title" elements when this sub gets run.
 
Back
Top Bottom