Serializing Complex Objects

  • Thread starter Thread starter Martin. D. Waller
  • Start date Start date
M

Martin. D. Waller

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
 
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
 
Many thanks..

Martin

Jan Tielens said:
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
 
Back
Top