470,815 Members | 1,080 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,815 developers. It's quick & easy.

Deserializing an XML (soap) file on a pocket pc into a hashtable

I am porting some code from a PC to a PocketPC. I want to read data
from an XML-file into a hashtable. But since the soapformatter does not
exist in the compact framework I have to find a workaround. I have
tried to use xmlserializer, but it always wants me to supply it with a
type. If I use the type of hashtable I get an exception. Any help or
hints would be highly appreciated.

Below is the code as it more or less looks in my program :

public struct CMDCLASSES
public Hashtable CmdClasses;

public CMDCLASSES ReadXml(string filename)
Stream streamReader = null;

SoapFormatter serializer = new SoapFormatter();
streamReader = File.OpenRead(filename);
if (streamReader != null)
temp = (CMDCLASSES)serializer.Deserialize(streamReader);
return temp;

Apr 28 '06 #1
0 1095

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by batalla | last post: by
8 posts views Thread by xmail123 | last post: by
4 posts views Thread by Christian Wilhelm | last post: by
reply views Thread by Michael_R_Banks | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.