RobinTibbs
Member
- Joined
- Nov 8, 2006
- Messages
- 18
- Programming Experience
- Beginner
Probably missing something silly again
but i get the following error when trrying to read an xml file
'element wowPath cannot be found'
here is the code. bear i mind i know the structure of the xml file and it stays the same
'element wowPath cannot be found'
here is the code. bear i mind i know the structure of the xml file and it stays the same
VB.NET:
<Preferences>
<wowPath>path</wowPath>
<version>version</wowPath>
</Preferences>
VB.NET:
Dim xmlR As XmlTextReader
xmlR = New XmlTextReader("prefs.xml")
xmlR.WhitespaceHandling = WhitespaceHandling.None
xmlR.Read()
Dim wowPath = xmlR.ReadElementString("wowPath")
Dim bwVersion = xmlR.ReadElementString("bwVersion")
TextBox1.AppendText("wowPath: " + wowPath + ControlChars.CrLf)
TextBox1.AppendText("bwVersion: " + bwVersion + ControlChars.CrLf)
xmlR.Close()