c# - Deserializing using XElement -


I had to write my own deserializer, because XmlSerializer and DataContractSerializer are not good for my needs, so it's the basis of my deserializer Is:

  Fixed base element perclosure (excelment element) {var E = (element) catalyst. Create Ention (Type GateType ("Element." + Element.Name)); Variable attribute (value, attr.Value, property.PropertyType), property attribute (attr.Name.LocalName); property value (E., convert.change type) in front (element.Attributes ()) var attr {var property = e.GetType () Empty);} varach in element.Elements () var e.Elements.Add (ParseXml (x)); return e;}  
 

baseAlment class:

  Public abstract class baselment {public base element} {Elements = New list & gt; Element & gt; ();} Public IList & lt; Element & gt; Elements {get; set;} }  

The only limitation is that I have a custom type There can not be attributes because I can not convert to a custom type using Convert.ChangeType

thanks

An example from your custom type variable. MSDN by implementing your IConvertible interface.


Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -