473,385 Members | 1,983 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Serialize Hashtable to readable format?

Jen
I have a Hashtable serializing to a binary file ok but I really would like
the file to be in XML format or other readable format. I DO NOT want to
change all my code, I want to keep the Hashtable in place. Is there an easy
way to serialize/deserialize to/from something readable instead of binary?
May 19 '07 #1
2 2517
Jen wrote:
I have a Hashtable serializing to a binary file ok but I really would like
the file to be in XML format or other readable format. I DO NOT want to
change all my code, I want to keep the Hashtable in place. Is there an easy
way to serialize/deserialize to/from something readable instead of binary?
Check:
http://blogs.msdn.com/psheill/archiv...09/406823.aspx

arne
May 20 '07 #2
Well, if you are using the IFormatter interface and some sort of
factory, you will only have to change a little bit of your code (the part
that gets the IFormatter implementation).

If not, then you will have to change all instances of the
BinaryFormatter to use your specific formatter type, or, the IFormatter
interface, and call to get the appropriate formatter.

The only remoting formatter that I know of which produces anything
readable is the SoapFormatter. While you can use this, you should note that
the format that the SoapFormatter will be noticeably larger than what the
binary formatter produces.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Jen" <no**@nowhere.comwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
>I have a Hashtable serializing to a binary file ok but I really would like
the file to be in XML format or other readable format. I DO NOT want to
change all my code, I want to keep the Hashtable in place. Is there an
easy way to serialize/deserialize to/from something readable instead of
binary?

May 20 '07 #3

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

Similar topics

0
by: Brij | last post by:
Hi Guys, kinda hopin someone has an answer to this. I have some user information that i need to dump into a cookie, but its not a straightforward dump. I have a collection of data in a...
5
by: David Sworder | last post by:
Hi, I've created a UserControl-derived class called MyUserControl that is able to persist and subsequently reload its state. It exposes two methods as follows: public void Serialize(Stream...
2
by: Diego F. | last post by:
I need to serialize a hash table in a file (xml or other), but I'm new with all this and I don't know how to serialize. Can you put me a piece of code to do this? Regards, Diego F.
2
by: MichiSu11 | last post by:
I want to serialize the properties of controls. I write Property Name and Value to an Hashtable. This hashtable is serialized. So I want to find out which properties of the control are serializable....
1
by: Bill L | last post by:
Hi guys, Because of restarting application after new DLLs installed into \Bin folder , we move the session to StateServer, everything'a alright except when I try to write any simple hash table...
1
by: Raed Sawalha | last post by:
we have already built Web Application,we did changes on in class in application so , we need to pass a Hashtable object to a webserivce, we're using XML Serialization , my problem in how to...
7
by: Ben Amada | last post by:
I've created a class that I need to store in ViewState. However when I try to store it in ViewState, I get the following error: "The type 'solution.pe2' must be marked as Serializable or have a...
5
by: Dick | last post by:
Hello, I'm trying to serialize a class with a Hashtable within: ' Class code: Imports System.Collections Class clsOptions Public countID As Integer Public persons As New Hashtable End Class
6
by: Joe | last post by:
Hello All, I want to serialize a hashtable to a database table to persist its values between postbacks. The client requires that I not use ViewState, hence the database. The samples in MSDN...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.