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
Why should he care what format in which the objects are serialized to persist to a database? In fact, it would probably be better to use the BinaryFormatter and save the result as a blob. *** that's why I suggested to use the BinaryReader ;) 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 ... I've serialized and deserialized numerous object graphs with the SoapFormatter and have never needed to strip any soap tags from the serialized data. Could you briefly describe the problem? I always like to know of potential pitfalls lying ahead. <g> *** If you really want a complete XML based representation of your object but none of these extra soap tags, you should strip them off, no ? *** Of course that's a moot point when you're only storing the objects to rehydrate them later, but I think we already agreed *** a binary format might be better suited for that purpose anyway. 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.