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

>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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.