The title says it all, I want to know how to read various pieces of data from .xml files in visual basic. My current, basic, xml file looks like:
<?xml version="1.0"?>
-<ArrayOfActivity xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-<activity>
<memno>1239</memno>
<curweek>0</curweek>
<rundist>0</rundist>
<runtime>0</runtime>
<swimdist>0</swimdist>
<swimtime>0</swimtime>
<cycdist>0</cycdist>
<cyctime>0</cyctime>
</activity>
-<activity>
<memno>1293</memno>
<curweek>0</curweek>
<rundist>0</rundist>
<runtime>0</runtime>
<swimdist>0</swimdist>
<swimtime>0</swimtime>
<cycdist>0</cycdist>
<cyctime>0</cyctime>
</activity>
</ArrayOfActivity>
I want to just read to values from, say, member number 1239, how do I go about this? I cannot make sense of any on-line help, I am fairly new to visual basic. I also save through this method:
Public Sub SaveDataAct()
If System.IO.File.Exists("e:\Test\test2.xml") = True Then
System.IO.File.Delete("e:\Test\test2.xml")
End If
Dim serializer As New Xml.Serialization.XmlSerializer(GetType(List(Of activity)))
Dim fs As New IO.FileStream("e:\Test\test2.xml", IO.FileMode.Create)
serializer.Serialize(fs, dataentry)
fs.Close()
End Sub