Examples below shows a simple XML document generated for a struct that contains two fields. Note that the field types will always be the basic types and not the domain definitions derived from those basic types.
<DOCUMENT> <META> <GENERATED_BY>My Server</GENERATED_BY> </META> <DATA> <STRUCT> <SNAME>DPTicketDtls</SNAME> <FIELD> <FNAME>ticketID</FNAME> <TYPE>SVR_INT64</TYPE> <VALUE>12796</VALUE> </FIELD> <FIELD> <FNAME>subject</FNAME> <TYPE SIZE="100">SVR_STRING</TYPE> <VALUE>This is the subject.</VALUE> </FIELD> </STRUCT> </DATA> </DOCUMENT>
In the next example, the format of an XML document describing a list of structs is presented. Note that the <STRUCT> elements are the same as previously, but multiple <STRUCT> elements are contained within a <STRUCT_LIST> element.
<DOCUMENT> <META> <GENERATED_BY>My Server</GENERATED_BY> </META> <DATA> <STRUCT_LIST> <STRUCT> <SNAME>DPTicketDtls</SNAME> <FIELD> <FNAME>ticketID</FNAME> <TYPE>SVR_INT64</TYPE> <VALUE>12796</VALUE> </FIELD> <FIELD> <FNAME>subject</FNAME> <TYPE SIZE="100">SVR_STRING</TYPE> <VALUE>This is the subject.</VALUE> </FIELD> </STRUCT> <STRUCT> <SNAME>DPTicketDtls</SNAME> <FIELD> <FNAME>ticketID</FNAME> <TYPE>SVR_INT64</TYPE> <VALUE>35667</VALUE> </FIELD> <FIELD> <FNAME>subject</FNAME> <TYPE SIZE="100">SVR_STRING</TYPE> <VALUE>This is another subject.</VALUE> </FIELD> </STRUCT> </STRUCT_LIST> </DATA> </DOCUMENT>
If a field of a struct is itself a struct, then instead of a <TYPE> and <VALUE> element, the <FIELD> element will contain a whole <STRUCT> element. Fields can also contain <STRUCT_LIST> elements in the same manner.