lapas,
The two are incredibly different. Internally, they are separate
programs. You should be more worried about what they do.
XML Serialization will "serialize" (I put it in quotes because it is not
truly serialization, it won't always give you an object that has the same
exact internal state as the one that you serialized) just the public
properties of an object.
Using serialization with the SOAP formatter will actually take the field
values of an object (through reflection) and store all of that information
in the stream passed to you.
Depending on what you are doing, one will be more appropriate than the
other. The XML Serializer is used typically for serializing simple types
across web services, or sending the serialized type to other applications
that won't understand the output that the SOAP or binary formatters will
produce.
Using a proper formatter for serialization should be used in other
scenarios, like when talking to other .NET applications.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"laplas" <la****@discussions.microsoft.com> wrote in message
news:E4**********************************@microsof t.com...
Hello,
what is the internal difference between them in FW 2.0?
I'm trying to serialize SqlConnectionInfo from SQL SMO and Soap works
just
fine but XML throws an exception
SqlConnectionInfo has SerializableAttribute attribute ????