Nothing to add :) Christoph Schittko Software Architect Mshow - a division of InterCall ----- Original Message ----- From: "Brent E. Rector" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, May 20, 2002 5:33 PM Subject: Re: [DOTNET] Object serialization to string representation
**inline** (though the short version is we totally agree on all matters <grin>) -- Brent Rector, .NET Wise Owl Demeanor for .NET - an obfuscation utility http://www.wiseowl.com/Products/Products.aspx -----Original Message----- From: Christoph [mailto:[EMAIL PROTECTED]] Sent: Monday, May 20, 2002 3:17 PM To: [EMAIL PROTECTED] Subject: Re: [DOTNET] Object serialization to string representation inline with *** ----- Original Message ----- From: "Brent E. Rector" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, May 20, 2002 5:08 PM Subject: Re: [DOTNET] Object serialization to string representation <snip> Certainly, XML serialization is one choice when you need to exchange documents with non-.NET systems. But, then of course, you must seriously restrict the set of types you attempt to serialize. *** I'd even argue that you should only serialize classes you specifically designed to use with the XmlSerializer ... [Brent] I couldn't agree more here! In fact, I'd argue one should start the whole process by writing the XML Schema definition for what you want to save/exchange. I then use XSD to get the source for the appropriate types already containing many of the attributes needed. This isn't perfect as I always have to tweak the generated source code plus if I then regenerate the schema from the tweaked source code, I get an xsd that I then need to tweak as well. But this is still the way to go I think. <snip> Christoph -- Brent Rector, .NET Wise Owl Demeanor for .NET - an obfuscation utility http://www.wiseowl.com/Products/Products.aspx -----Original Message----- From: Christoph [mailto:[EMAIL PROTECTED]] Sent: Monday, May 20, 2002 2:46 PM To: [EMAIL PROTECTED] Subject: Re: [DOTNET] Object serialization to string representation Yes, but you have no control over the format your objects are serialized in, which works OK, if you use serialization only as a means for persistant storage. However, it doesn't work well if you are serializing objects with the intent to exchange XML messages between systems and you have to produce XML of a certain shape. Also, if you use the SoapFormatter you have to "strip" all the soap tags from the generated XML document. HTH, Christoph Schittko Software Architect Mshow - a division of InterCall ----- Original Message ----- From: "Brent E. Rector" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, May 20, 2002 4:49 PM Subject: Re: [DOTNET] Object serialization to string representation IMO, the SoapFormatter is a better choice because it can represent all serializable .NET types while the XML serializer is quite restricted as to the types it supports. Especially if I correctly understood he intends to save the string dta to a database and, I assume, rehydrate it later on a .NET system. You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com. You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com. You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com. You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.