G
Guest
I'm trying to serialise an object to obtain its serialiased XML representation. However I also want to control this by using the ISerializable interface, as I want to specifically override some values within the GetObjectData call.
We were using the XMLSerializer object to serialsie the object, but this doesnt' seem to run the GetObjectData call. It seems that only the BinaryFormatter object uses this method...(reading on the MSDN site, the XMLSerialiser and web Services only use shallow serialisation not deep
Using the BinaryFormatter object, I get the serialised object that I want, so....the question is, if I've got my serialised object in a memoryStream object, can I get at it in the XMLSerializer format?
ie..
Using
Dim bF As New BinaryFormatte
Dim ms As New MemoryStrea
bF.Serialize(ms, myObject
Can I return the same format xml as if I'd use
Dim xsSerializer As New Serialization.XmlSerializer(GetType(Base)
Dim swWriter As New System.IO.StringWrite
xsSerializer.Serialize(swWriter,
myObject
Thanks in advance
Craig
We were using the XMLSerializer object to serialsie the object, but this doesnt' seem to run the GetObjectData call. It seems that only the BinaryFormatter object uses this method...(reading on the MSDN site, the XMLSerialiser and web Services only use shallow serialisation not deep
Using the BinaryFormatter object, I get the serialised object that I want, so....the question is, if I've got my serialised object in a memoryStream object, can I get at it in the XMLSerializer format?
ie..
Using
Dim bF As New BinaryFormatte
Dim ms As New MemoryStrea
bF.Serialize(ms, myObject
Can I return the same format xml as if I'd use
Dim xsSerializer As New Serialization.XmlSerializer(GetType(Base)
Dim swWriter As New System.IO.StringWrite
xsSerializer.Serialize(swWriter,
myObject
Thanks in advance
Craig