The basic idea behind XMLWorks is to use Delphi classes to generate DTD and entity information. All you have to do is create a descendant class of a TXMLObject base class and publish the properties you want persisted.

For example you can declare a descendant class of TXMLCollection named something like TAuthorCollection. When generating the XML it will automatically use the name 'Author' (the text between the 'T' and 'Collection') + '-list'.

For the TXMLCollectionItem descendant class, you must publish all the properties you want saved in the entity information. Just like the collection class, XMLWorks will automatically use the name between 'T' and 'Collection'.

type
  TAuthorCollection = class(TXMLCollection)
  end;
  
  TAuthorCollectionItem = class(TXMLCollectionItem)
  private
    fphone: String;
    fau_id: String;
    faddress: String;
    fcity: String;
    fpostalcode: String;
    fau_lname: String;
    fstate: String;
    fau_fname: String;
    ftestint : Integer;
    ftestchar: char;
    ftestfloat: real;
    ftestint64: Int64;
    ftestenum: TAuthorType;
    ftestvariant: Variant;
  published
    property au_id : String read fau_id write fau_id;
    property au_lname : String read fau_lname write fau_lname;
    property au_fname : String read fau_fname write fau_fname;
    property phone : String read fphone write fphone;
    property address : String read faddress write faddress;
    property city : String read fcity write fcity;
    property state : String read fstate write fstate;
    property postalcode : String read fpostalcode write fpostalcode;
    property TestInt : Integer read ftestint write ftestint;
    property TestFloat : real read ftestfloat write ftestfloat;
    property TestVariant : Variant read ftestvariant write ftestvariant;
    property TestInt64 : Int64 read ftestint64 write ftestint64;
    property TestChar : char read ftestchar write ftestchar;
    property TestEnum : TAuthorType read ftestenum write ftestEnum;
  end;