|
-
Jun 3rd, 2009, 08:18 PM
#1
Thread Starter
New Member
Query multiple xml files
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|