Einhugur Serialization Framework for Xojo |

# XmlSerializer.DeSerialize Method

De-serialize's a class structure

DeSerialize(
item as Object,
rootName as String,
xmlDoc as XmlDocument)

#### Parameters

item
  The object to de-serialize into
rootName
  Name of the root.
xmlDoc
  The Xml Document to be de-serialized.

#### Remarks

All classes that are de-serialized must have a default constructor that has no parameters.
In this example here we needed to add Customer and Address as known types as they were serialized as Polymorphic objects instead of strongly typed.

s = new XmlSerialization.XmlSerializer()
s.AddKnownClass(GetTypeInfo(Customer))
s.AddKnownClass(GetTypeInfo(Address))
Dim deserializedFacility as Facility = new Facility()
s.DeSerialize(deserializedFacility,"Facility",xmlDoc)

#### See Also

XmlSerializer Class