[Mono-devel-list] Re: asorted xml implementation questions
eriklebel at yahoo.ca
Thu Apr 10 00:28:33 EDT 2003
sorry for the great delay in responding, two thoughts:
1) the more I look at their API I'm convinced that MS uses derived classes of XmlSerializer and XmlSerializationWriter. The problem is that I cannot see the advantage. Further delving into serialization has led me to believe that all of the functionality i need for WSDL generation is possible directly from XmlSerializer. I think that our best bet for now is to keep the approach that Mono currently has, until more info or needs drive us in another direction. These base/derived class things are undocumented, thus end-user code should not use it anyway.
2) for serialization order: the more I look at this, I'm convinced that MS just relies on a guarenteed reflection order of a class' members. This is not unreasonable to a point:
- base classes should be reflected first, and in the order (or reverse order) in which they are referenced in the class declaration.
- members should be reflect in the order in which they appear.
should Mono's reflection framework follow the same pattern? (it may warrant a test suit).
ginga at kit.hi-ho.ne.jp wrote:
> XmlSerializer/XmlSerializationWriter: Judging by the argument lists
> of XmlSerializerÃÔ Serialize methods, it looks like the protected
> method that takes the XmlSerializationWriter is probably the real
> serializer that the other methods should call by wrapping their
> stream/textwriters/xmltextwriters/etc in an XmlSerializationWriter
> (actually a derived class of it).
I think it is right, but how do you think to go along with it?
I attached an experimental test. Serialize (object, XSW) wan't
called from Serialize (TextWriter, object).
> property must be available outside of the System.Xml assembly.
> An example of this occurs when generating a WSDL from a
> ServiceDescription object through serialization. Element order is
> important in WSDLs, and
Then I wonder why MS System.Web.Serivices.dll developers could
serialize ServiceDescription without such Order attribute...
Hmm... I wonder I had better dive into serialization stuff... ;)
> ATTACHMENT part 2 application/octet-stream name=xsw.cs
Post your free ad now! Yahoo! Canada Personals
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Mono-devel-list