views:

6

answers:

0

Dim myString As String 'This string is XML with special characters like 'Ö'

Dim memstream As New IO.MemoryStream(System.Text.UTF8Encoding.Default.GetBytes(myString))

Dim serializer As New XmlSerializer(GetType(ABCD))

Dim abc As ABCD = CType(serializer.Deserialize(memstream), ABCD)

This is throwing an exception 'bad xml' due to special characters in the XML String 'mystring'. If I do not have Special characters, It is working fine.

Please help me with this.