473,394 Members | 1,821 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,394 software developers and data experts.

Serialize multiple object in the same XML file

Hello,

I'm looking for a best way to serialize multiple / different object in the
same XML file, and of course, how can i deserialize it.

Actualy, when i serialize the first object in XML file, it work fine,
But the second erase the entry of the first object !!!

Thank's by advance

Gislain

Nov 17 '05 #1
3 3231
Hello Gislain,

Create a collection of objects and serialize it to a xml file. WHen you deserialize,
you get same collection back.

Mihir Solanki
http://www.mihirsolanki.com
Hello,

I'm looking for a best way to serialize multiple / different object in
the same XML file, and of course, how can i deserialize it.

Actualy, when i serialize the first object in XML file, it work fine,
But the second erase the entry of the first object !!!

Thank's by advance

Gislain

Nov 17 '05 #2
Hi,

Does it work with different object in the same collection ?

Thank's

Gislain.

"Mihir Solanki" <mi**********@hotmail.com> wrote in message
news:19*************************@msnews.microsoft. com...
Hello Gislain,

Create a collection of objects and serialize it to a xml file. WHen you
deserialize, you get same collection back.
Mihir Solanki
http://www.mihirsolanki.com
Hello,

I'm looking for a best way to serialize multiple / different object in
the same XML file, and of course, how can i deserialize it.

Actualy, when i serialize the first object in XML file, it work fine,
But the second erase the entry of the first object !!!

Thank's by advance

Gislain


Nov 17 '05 #3
The way I am using is creating an class which has all the objects I want
to serialize.

In the construct, I will read each node representing each object ,and
deserilze one by one.

I have a ToXml method, and in which I will serialize one by one.

There may be better methods available.

John

Gislain wrote:
Hi,

Does it work with different object in the same collection ?

Thank's

Gislain.

"Mihir Solanki" <mi**********@hotmail.com> wrote in message
news:19*************************@msnews.microsoft. com...
Hello Gislain,

Create a collection of objects and serialize it to a xml file. WHen you
deserialize, you get same collection back.
Mihir Solanki
http://www.mihirsolanki.com

Hello,

I'm looking for a best way to serialize multiple / different object in
the same XML file, and of course, how can i deserialize it.

Actualy, when i serialize the first object in XML file, it work fine,
But the second erase the entry of the first object !!!

Thank's by advance

Gislain



Nov 17 '05 #4

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

Similar topics

1
by: Luiz Rafael Fernandes | last post by:
Hi... i try to serialize a object inherited of label control, as follow: //definition public class WinLabel : System.Windows.Forms.Label { public WinLabel() {} }
4
by: veereshai | last post by:
i want to copy the functions from my source file into a new file...and convert each function into a new object file by compiling it. now, i want to invoke the function using the object file i have...
5
by: Julia | last post by:
Hi, I need to serialize an object in such a way that it can be passed as parameter in a URL http://www.domain.com?object=%d793btng.... I did some reading and I came to the conclusion that I...
0
by: deko | last post by:
I'm building an app that will snycronize user-selected directories. In the UI, a user can select several folder pairs for syncronization and schedule it for later. So, I want to store the paths to...
0
by: Redowl | last post by:
Hi, I am trying to serialize a business object using xml generated by a FOR XML query and the resulting xml has no root element. I have created my business object using the schema returned from...
0
by: amitp | last post by:
Can anyone help me out in this? I want to append multiple RTF file into one RTF file. I tried using 'streamwriter', the resulting file size becomes big and when i open it, it is the original i.e the...
5
by: jayapal | last post by:
Hi all, We have large code on which we are solving the bugs. For every bug we change the code part either add or delete some of the code part. More is adding the code part and very less is...
1
by: goelamit1982 | last post by:
How to Read multiple text file using XML and store into the database
2
by: Patrick Sona | last post by:
Hi all! has anyone an idea how to serialize an object to a String without using XMLSerializer? The problem is, that i have to serialize a Hashtable to a String and the XMLSerializer doesn't...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
0
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,...
0
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...
0
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...

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.