Peter,
I think that you are confusing us. What you are trying to do is not
serializing in my opinion.
Shared Sub Main()
Dim list As ArrayList = New ArrayList()
Dim out As StreamWriter = New StreamWriter("a rray.xml")
Dim ser As XmlSerializer = New XMLSerializer(l ist.GetType())
list.Add("a")
list.Add("2")
list.Add("three ")
ser.Serialize(o ut, list)
This seems if you want to convert a kind of XML document to an arraylist.
That is not serializing. That is using the XMLNodeReader. See this sample
that I once made, just as a start because it needs a lot more.
\\\\
Dim xmlString As String = "<departmen t>" & _
"<employee name=""ABC"" age=""31"" sex=""male""/>" & _
"<employee name=""CDE"" age=""40"" sex=""male""/></department>"
Dim sr As New System.IO.Strin gReader(xmlStri ng)
Dim doc As New Xml.XmlDocument
doc.Load(sr)
'or just in this case doc.LoadXML(xml String)
Dim reader As New Xml.XmlNodeRead er(doc)
While reader.Read()
Select Case reader.NodeType
Case Xml.XmlNodeType .Element
If reader.Name = "employee" Then
MessageBox.Show (reader.GetAttr ibute("name"))
End If
End Select
End While
///
I hope this helps?
Cor