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.Node Type = XmlNodeType.Ele ment Then
Console.WriteLi ne("Node:" & readWNInfo.Name & _
", AttributeCount: " & _
readWNInfo.Attr ibuteCount.ToSt ring())
End if
End while
readWNInfo.Clos e()
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 ***