I receive an xml file as a string, across a socket, and I want to import that string into a dataset.
Here's my code so far but it doesn't work.
VB Code:
Dim ms As New System.IO.MemoryStream Dim sw As New System.IO.StreamWriter(ms) sw.Write(xmlFileString) ms.Position = 0 Dim ds As New DataSet ds.ReadXml(ms) ms.Close()
Here's my xml string
<?xml version="1.0" encoding="iso-8859-1" ?>
<banlist>
<ban>
<datetime>Wed Mar 08 21:21:38 2006</datetime>
<nick>ParaDiddle[BF2CC]</nick>
<method>Key</method>
<period>Perm</period>
<address>127.0.0.1</address>
<cdkeyhash>b5b1074e479b8bd89df9cae38fa2c1f6</cdkeyhash>
<profileid>44681561</profileid>
<by>admin</by>
<reason>BANNING!!! ParaDiddle[BF2CC] for Team Killing!</reason>
</ban>
<ban>
<datetime>Thu Mar 09 07:13:49 2006</datetime>
<nick>=[BFT]=Sr7</nick>
<method>Key</method>
<period>Perm</period>
<address>24.5.22.132</address>
<cdkeyhash>2edb0a0062a7ec9c7407edaafd3ec315</cdkeyhash>
<profileid>45281450</profileid>
<by>admin</by>
<reason>BANNING!!! =[BFT]=Sr7 for Team Killing!</reason>
</ban>
</banlist>




Reply With Quote