因此,例如如何序列化这样的对象:
unit u_Configuration;
interface
uses
Classes,
Generics.Collections,
OmniXML,
OmniXMLPersistent
;
type
TMyObject = class (TPersistent)
strict private
fName : String;
public
published
property Name: String read fName write fName;
end;
TConfiguration = class(TPersistent)
strict private
fTheList : TList<TMyObject>;
private
public
published
property TheList: TList<TMyObject> read fTheList write fTheList;
end;
implementation
end.