Create an Xml file from an object
        Posted  
        
            by remi bourgarel
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by remi bourgarel
        
        
        
        Published on 2010-04-07T13:47:19Z
        Indexed on 
            2010/04/12
            20:43 UTC
        
        
        Read the original article
        Hit count: 509
        
I work as a web developer with a web designer and we usually do like this : - I create the system , I generate some Xml files - the designer display the xml files with xslt
Nothing new.
My problem is that I use Xml Serialization to create my xml files, but I never use Deserialization. So I'd like to know if there is a way to avoid fix like these :
- empty setter for my property 
- empty parameter-less constructor 
- implement IXmlSerializable and throw "notimplementedexception" on deserialization 
- do a copy of the class with public fields 
© Stack Overflow or respective owner