Home World Forum
Stars! AutoHost web forums

Jump to Stars! AutoHost


 
 
Home » Stars! Clones, Extensions, Modding » Stars! Nova - Development » XML Serialization
XML Serialization Fri, 24 June 2011 02:01 Go to next message
Aeglos is currently offline Aeglos

 
Chief Warrant Officer 1
Stars! Nova developer
Stars! Nova developer

Messages: 142
Registered: May 2011
Location: Chile
I was pondering the benefits of automated XML serialization, since derheld mentioned it on SF and since I need to implement it for some datastructures that don't have it yet.

To be honest, I like the manual construction of the XML documents that Dan devised and we are using. I feel it gives us control over their structure and content instead of relying in some unseen .Net rules.

And from what i've seen, the XmlSerializer in .Net has some quirks; for example it wont serialize private fields, unless they have a related public Property or they have some special attributes declared for data contracts. Some elements won't even appear if they are null unless we tag them with an IsNullable.

So for now I'll keep using the manual construction methods. If derheld provides some wisdom about the .Net xml serializer benefits over them, I'll be happy to switch though.

Report message to a moderator

Re: XML Serialization Fri, 24 June 2011 04:11 Go to previous messageGo to next message
Musmuris

 
Master Chief Petty Officer
Stars! Nova developer
Stars! Nova developer

Messages: 96
Registered: June 2011
It's great magic in theory, and there's probably loads of attributes to control it. But given we already have manual XML I would like to stick with it for now.

Report message to a moderator

Re: XML Serialization Fri, 24 June 2011 07:29 Go to previous message
Daniel is currently offline Daniel

 
Chief Warrant Officer 3
Stars! Nova developer
Stars! Nova developer

Messages: 179
Registered: April 2006
Location: Nowra, Australia
I spent many weeks trying to get the xml serialiser to work for me. I got it to work fine for some basic data structures but the complex object graphs for ship designs seemed to defeat it. I remember polymorphism with the Design and ShipDesign objects causing particular problems. I would be interested if someone with experience could shead some light on this, but I am not unhapy with the manual methods we have, as they work fine.


Have fun.

Report message to a moderator

Previous Topic: New Cargo/Fuel meter
Next Topic: Completing the Forum Move
Goto Forum:
  


Current Time: Thu Apr 25 11:19:53 EDT 2024