Sample DID document with XML file connection

DEFINE_DID
  NAME            "XMLexampleDID"
  IDENTIFICATION  XML
  DIDMODULE_LIST  "XMLexampleDID"
  MAIN_ENTRY_LIST
        Customer                       FROM "XMLexampleDID"
END_DEFINE_DID
DEFINE_DIDMODULE
  NAME       "XMLexampleDID"
  CONNECTION XMLFILE
DEFINE_ENTRY
    NAME                     Customer                       (* Customer *)
    MODEL_DOCUMENT_STATEMENT WITH
    DATA_RETRIEVAL           "Customer"
    KEY_RETRIEVAL            "*NONE"
    DEFINE_FIELDS
      CustomerNumber                 DOUBLE                  DATABASE_FIELD "CustomerNumber"
      LastName                       C_CHAR  LENGTH ( 255  ) DATABASE_FIELD "LastName"
      Prefix                         C_CHAR  LENGTH ( 255  ) DATABASE_FIELD "@Prefix"
      FirstName                      C_CHAR  LENGTH ( 255  ) DATABASE_FIELD "FirstName"
      Initials                       C_CHAR  LENGTH ( 255  ) DATABASE_FIELD "Initials"
      DateOfBirth                    DOUBLE                  DATABASE_FIELD "DateOfBirth"
      DateOfDeath                    DOUBLE                  DATABASE_FIELD "DateOfDeath"
      Gender                            C_CHAR  LENGTH ( 255  ) DATABASE_FIELD "Gender"
      MaritialStatus                 C_CHAR  LENGTH ( 255  ) DATABASE_FIELD "MaritialStatus"
      PartnerNumber                  DOUBLE                  DATABASE_FIELD "PartnerNumber"
      Info                           C_CHAR  LENGTH ( 255  ) DATABASE_FIELD "Info"
       Comment                        C_CHAR  LENGTH ( 255  ) DATABASE_FIELD "Comment"
(* Info and Comment are mixed content elements, they are fields of their containing tag as well as subentries. See below for their subentry definition *)
     END_DEFINE_FIELDS
    DEFINE_SUBENTRIES
      Address                        (* Address *)
      Info                           (* Mixed content element; both a field of the
                                        containing tag and a subentry *)
      Comment                        (* Mixed content element; both a field of the
                                        containing tag and a subentry *)
    END_DEFINE_SUBENTRIES
  END_DEFINE_ENTRY
  DEFINE_ENTRY
    NAME                     Address                        (* Address *)
    MODEL_DOCUMENT_STATEMENT FORALL
    DATA_RETRIEVAL           "Address"
    KEY_RETRIEVAL            "*NONE"
    DEFINE_FIELDS
      CustomerNumber                 DOUBLE                  DATABASE_FIELD "CustomerNumber"
      ZipCode                        DOUBLE                  DATABASE_FIELD "ZipCode"
      Number                         DOUBLE                  DATABASE_FIELD "Number"
      Street                         C_CHAR  LENGTH ( 255  ) DATABASE_FIELD "Street"
      City                           C_CHAR  LENGTH ( 255  ) DATABASE_FIELD "City"
      Country                        C_CHAR  LENGTH ( 255  ) DATABASE_FIELD "Country"
    END_DEFINE_FIELDS
    DEFINE_SUBENTRIES
    END_DEFINE_SUBENTRIES
  END_DEFINE_ENTRY
DEFINE_ENTRY
    NAME                     Info                           (* This is the subentry Info *)
    MODEL_DOCUMENT_STATEMENT WITH
    DATA_RETRIEVAL           "Info"
    KEY_RETRIEVAL            "*NONE"
    DEFINE_FIELDS
      Source                        C_CHAR LENGTH ( 255  )  DATABASE_FIELD "Source"
      Source_date                   C_CHAR LENGTH ( 255  )  DATABASE_FIELD "SourceDate"
 (* These elemnts are the non-repeating tags within Info, turned into fields of entry Info *)
    END_DEFINE_FIELDS
    DEFINE_SUBENTRIES
    END_DEFINE_SUBENTRIES
  END_DEFINE_ENTRY  
DEFINE_ENTRY
    NAME                     Comment                           (* Comment *)
    MODEL_DOCUMENT_STATEMENT WITH
    DATA_RETRIEVAL           "Comment"
    KEY_RETRIEVAL            "*NONE"
    DEFINE_FIELDS
    END_DEFINE_FIELDS
    DEFINE_SUBENTRIES
      P                              (* p *)                   
      (* This is the repeating tag within the mixed content 'Comment' tag and a 
         subentry of Comment.*)
    END_DEFINE_SUBENTRIES
  END_DEFINE_ENTRY
DEFINE_ENTRY
NAME                     P         (* definition of the subentry P containing the
                                      repeating tag within Comment *)
    MODEL_DOCUMENT_STATEMENT FORALL    
    DATA_RETRIEVAL           "p"
    KEY_RETRIEVAL            "*NONE"
    DEFINE_FIELDS
      Self                           C_CHAR LENGTH ( 255  )  DATABASE_FIELD "."
(* This field provides access to the values contained in the repeating subtag 'p' *)
    END_DEFINE_FIELDS
    DEFINE_SUBENTRIES
    END_DEFINE_SUBENTRIES
  END_DEFINE_ENTRY
END_DEFINE_DIDMODULE