0

Hi,

I have made a working program that collects data from a server then puts it into an array. I decided its time to move away from text files and on to XML.

Dim sr As StreamReader = File.OpenText(frm_Loader.jokes_dic)
        Dim input As String
        input = sr.ReadLine()
        frm_Loader.counter = 0
        While Not input Is Nothing
            frm_Loader.TextLine(frm_Loader.counter) = input
            frm_Loader.counter = frm_Loader.counter + 1
            input = sr.ReadLine()
        End While
        sr.Close()

Above is my current code. The delimiter being a newline.

What am aiming for is processing a XML file into an array so i can still access my information via frm_loader.TextLine(a number or ID)

I know there are a few issues and bad practise in my current script like some variables being held in another form.

Has anyone got any functions or classes that may help me? Any links to sources would also be help full. Although I didn't find the MSDN helpful.

Thank-you All
Paul Hutchinson

2
Contributors
1
Reply
2
Views
7 Years
Discussion Span
Last Post by __avd
0

>What am aiming for is processing a XML file into an array

The shortest way to solve your problem is DataSet. Use ReadXml() method of DataSet class

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.