Saves an object to an XML file in Document format, supplying extra data types to enable serialization of custom types within the object.
Namespace:
AdvantageCMS.Core.Utils
Assembly:
AdvantageCMS.Core (in AdvantageCMS.Core.dll)
public static void Save(
T serializableObject,
string path,
Type[] extraTypes
)
Parameters
- serializableObject
- Type: T
Serializable object to be saved to file.
- path
- Type: String
Path of the file to save the object to.
- extraTypes
- Type: array<Type>[]()[][]
Extra data types to enable serialization of custom types within the object.
C#
SerializableObject serializableObject = new SerializableObject();
ObjectXMLSerializer<SerializableObject>.Save(serializableObject, @"C:\XMLObjects.xml", new Type[] { typeof(MyCustomType) });