Hey guys, i am trying to query multiple xml files automatically in order to get a specific data for each xml files. I have create a code but it only query one file at the time. Below is the code that i have created.


Imports System.Xml
Imports System.IO
Module ParsingUsingXmlTextReader


Sub Main()
Dim m_xmlr As XmlTextReader
m_xmlr = New XmlTextReader("C:\Testing\schaumburg_5min_cpu_143.xml")
m_xmlr.WhiteSpaceHandling = WhiteSpaceHandling.NONE
m_xmlr.Read()
m_xmlr.Read()
While Not m_xmlr.EOF
m_xmlr.Read()
If Not m_xmlr.IsStartElement() Then
Exit While
End If

Dim lastvalue = m_xmlr.ReadElementString("value")
Dim primary_value = m_xmlr.ReadElementString("primary_value")
Console.WriteLine(" primary_value: " & primary_value & " value: " _
& lastvalue)
Console.Write(vbCrLf)
End While
m_xmlr.Close()


End Sub

End Module