Try to read following type of XML file, but only get data back on first
node:
<log id="1234">
<message type="Action"/>
</log>
<log id="5678">
<message type="Drama"/>
</log>
<log id="1357">
<message type="Art"/>
</log>
Here is my very simple VB program:
Imports System.IO
Imports System.Xml
Dim readWNInfo As XmlTextReader
readWNInfo = New XmlTextReader("test.log")
While readWNInfo.Read()
If readWNInfo.NodeType = XmlNodeType.Element Then
Console.WriteLine("Node:" & readWNInfo.Name & _
", AttributeCount: " & _
readWNInfo.AttributeCount.ToString())
End if
End while
readWNInfo.Close()
If I add <rootat first line, and </rootat the end, the above code
works. Can I make work without modify the original log file?
Thanks for your help in advance,
Tom
*** Sent via Developersdex http://www.developersdex.com ***