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

Serializing Complex Objects

Hello,

Does anyone kow of any good examples or documents that talk about
serializing complex objects and object graphs to XML. Basically I would like
to have a class that references other classes etc and I'd like to serialize
the whole thing...

Many thanks...

Martin
Nov 22 '05 #1
2 1435
Hi

You can use the XMLSerializer class to do this:
System.Xml.Serialization.XmlSerializer ser = new
System.Xml.Serialization.XmlSerializer(myType);

ser.Serialize(myTextWriter, myObject);
Greetz
Jan

"Martin. D. Waller" <ma***********@beeb.net> wrote in message
news:u4**************@tk2msftngp13.phx.gbl...
Hello,

Does anyone kow of any good examples or documents that talk about
serializing complex objects and object graphs to XML. Basically I would like to have a class that references other classes etc and I'd like to serialize the whole thing...

Many thanks...

Martin

Nov 22 '05 #2
Many thanks..

Martin

"Jan Tielens" <ja*@no.spam.please.leadit.be> wrote in message
news:#q**************@tk2msftngp13.phx.gbl...
Hi

You can use the XMLSerializer class to do this:
System.Xml.Serialization.XmlSerializer ser = new
System.Xml.Serialization.XmlSerializer(myType);

ser.Serialize(myTextWriter, myObject);
Greetz
Jan

"Martin. D. Waller" <ma***********@beeb.net> wrote in message
news:u4**************@tk2msftngp13.phx.gbl...
Hello,

Does anyone kow of any good examples or documents that talk about
serializing complex objects and object graphs to XML. Basically I would

like
to have a class that references other classes etc and I'd like to

serialize
the whole thing...

Many thanks...

Martin


Nov 22 '05 #3

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

Similar topics

2
by: Martin. D. Waller | last post by:
Hello, Does anyone kow of any good examples or documents that talk about serializing complex objects and object graphs to XML. Basically I would like to have a class that references other...
2
by: sam | last post by:
I have a collection of vb.net objects with LoadXML and SaveXML functions which use XML serialization to persist the collection. Is it possible to Update one single object in the collection at a...
1
by: Ivo Bronsveld | last post by:
All, I have quite a challenging task ahead of me. I need to write an object model (for code access) based on a schema, which cannot be made into a dataset because of it's complexity. So I...
2
by: Tobias Zimmergren | last post by:
Hi, just wondering what serializing really is, and howto use it? Thanks. Tobias __________________________________________________________________ Tobias ICQ#: 55986339 Current ICQ status: +...
4
by: Dave Veeneman | last post by:
When does serializing objects make more sense than persisting them to a database? I'm new to object serialization, and I'm trying to get a feel for when to use it. Here is an example: I'm...
8
by: Joe | last post by:
Hello All: Say I have a solution with two projects (Project1 and Project2) and each project contains a class (Project1 contains Class1 and Project2 contains Class2). The projects don't...
2
by: Dennis | last post by:
Does anyone know why this code gives an error: <serializeable> public structure TestSerialize anumber as integer astring as string end strucuture Dim t As TestSerialize Dim formatter As New...
1
by: Chris Dunaway | last post by:
Consider the following simple class: <Serializable()> _ Public Class SimpleClass Private m_AString As String Private m_AByteArray As Byte() Public Property AString() As String . . . End...
2
by: Charles Law | last post by:
I have a complex object that I am serializing, and I would like to omit elements that have a default value. For example, if I have a class as follows Public Class Test Private m_Name As...
5
by: | last post by:
I've got a basic "chat" infrastructure that can send objects across the wire, but I'm running into a few issues with trying to send multiple messages and things behaving differently in debug and...
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
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?
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.