473,847 Members | 1,460 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 :

[Serializable]
public struct CMDCLASSES
{
public Hashtable CmdClasses;
}

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

SoapFormatter serializer = new SoapFormatter() ;
streamReader = File.OpenRead(f ilename);
if (streamReader != null)
{
temp = (CMDCLASSES)ser ializer.Deseria lize(streamRead er);
}
streamReader.Cl ose();
return temp;
}

Apr 28 '06 #1
0 1204

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2231
by: Kenneth Baltrinic | last post by:
I am getting the following error when deserializing an object that has a couple of dozen dependant objects in its object graph. Anyone who can suggest where I might begin to look to resolve problem I would greatly in debted to. Serializing the object works fine. When I try to deserialize it, I get the following error: A first chance exception of type 'System.Runtime.Serialization.SerializationException' occurred in mscorlib.dll Additional...
0
1113
by: batalla | last post by:
I´m looking about how to parse an XML-SOAP document to retrieve some data from this. I dont know about how can do this ¿with XMLDOM?, ¿with XMLReader?. Here is an example of the document that the webservice sends to me. The structure of the nodes is too strange for me, for example the 'row name='. Here is the document: <?xml version="1.0" encoding="UTF-8" ?> - <soapenv:Envelope...
8
6325
by: xmail123 | last post by:
Hi, As was pointed out whatever you return from a WebMethod needs to be serializable to SOAP. An ArrayList is not serializable. I will be needing to return other data types from web methods. Is there a document, or can some one list those types that are not serializable and the syntax for converting them? Thanks
2
3780
by: Phillip Galey | last post by:
I have an object called Place which contains only string properties and has the <Serializable()> flag before the class name declaration. I also have a collection object called Places, which is implemented using Inherits System.Collections.Specialized.NameObjectCollectionBase and also has the <Serializable()> flag before the class name declaration. In the calling code, I'm successfully serializing the object to an XML file using a...
4
7854
by: Christian Wilhelm | last post by:
Hi! I have a Problem understanding the deserialisation of SOAP-Responses. The "normal" way, calling a XML WebService is to use WSDL 1) Send Request 2) Get SOAP-Response 3) With Informations out of WSDL transform the SOAP-Response to an Object. Let us call it "Customer".
1
1947
by: Mike9900 | last post by:
Hello, We have a serialized XML from version 1.1 of .NET Framework and want to deserialize it in .NET Framework 2.0, but it failes to do so with the following error: Parse Error, no assembly associated with Xml key a1:http://schemas.microsoft.com/clr/nsassem/Company.Printing/Printing%2C%20Version%3D2.0.0.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dc8c9a20b0583cd1d TemplateManager
0
1614
by: Michael_R_Banks | last post by:
All, I'm trying to use SOAP to pass a serialized object from a VB.net application to a PHP application. Is this at all possible? Any help will be appreciated. I have included a copy of the SOAP file below. Regards, Michael
0
2807
by: theonlydavewilliams | last post by:
Hi there I'm hoping there's an easy answer to a (hopefully) not too long-winded issue... I'm building a C# web client using a proxy wsdl.exe'd from a wsdl file and six schemas, each in a different namespace. Some schemas extend complex types in others. When i get a soap:Fault from my test server it could contain a serialized exception object (called fault) from one of two of these schemas (and different namespaces, call them xmlns:b0="ns1" and...
2
2140
by: bhushanbsc | last post by:
Hi, I am working on a project related to windows pocket pc 5.0 (win32). in that i am trying client-server communicationusing SOAP server. but facing problem on IXMLHTTPRequest. #################### CODE ########################## //included files are,
0
9892
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of...
0
9734
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10654
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
7888
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7061
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5729
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5915
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4540
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4130
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.