Main BLOGGER
Google
WWW THIS BLOG
Thursday, February 10, 2005
 
How does .NET parse XML in serialization/de-serialization

Serialization/Deserialization in .NET

http://www.prescod.net/rest/dotnet/

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpovrSerializingObjects.asp

http://www.developer.com/net/csharp/article.php/3110371

-Question-

How does XmlSerializer work?

-Anwser-

http://www.topxml.com/xmlserializer/xmlserializer.asp


-Question-
The first method invocation on my web service is slow. I found the knowledgebasearticle

http://support.microsoft.com/default.aspx?scid=kb;en-us;323577

Using Ngen.exe didn't speed things up.Anyone know if there is a fix or workaround for this? Perhaps something thatcan be tuned in .NET or IIS?

-Anwser-
XmlSerializer generates and compiles code on the fly to do serializationand deserialization. This process is a big perf win for multipleserializations - the generated code is able to statically bind to targettypes so it doesn't have to use any reflection atserialize-/deserialize-time. I say multiple serializations because thereis an upfront cost to generate the serializer which must be amortized overmultiple serializations (so it makes most sense for long running apps suchas server-side web services).We addressed the "first invocation is slow" issue in Whidbey: we added afeature allowing to pre-generate the serialization assembly for the givencompiled client.Also a port to Everett was initiated (CDCR #1707) and the feature should beavailable soon.To obtain the client-side performance CDCR #1707 you have work with our PSS.

Thanks,Elena

-Question-
How to get the class source file generated on the fly by XmlSerializer ?

-Anwser-
http://msdn.microsoft.com/xml/default.aspx?pull=/library/en-us/dnxmlnet/html/trblshtxsd.asp

Troubleshooting Common Problems with the XmlSerializer
Summary: Christoph Schittko discusses various techniques for diagnosing common problems that occur when converting XML to objects and vice versa with XML Serialization technology in the .NET Framework. (13 printed pages)


-Question-
How to create custom xml serializers

-Anwser-
You can take the generated code, modify it to your pleasure, and add it to your application. And then your application can create an instance of XmlSerializer and tell it to use the modified reader and writer.

http://primates.ximian.com/~lluis/blog/pivot/entry.php?id=6




<< Home

Powered by Blogger

Google
WWW THIS BLOG