The purpose of the XML file is to describe the contents of a notebook window, giving each page a purpose and some widgets.
I'll try to talk about each aspect of the xml file but you should really read current plug-ins.
<pages> ... </pages>: everything is enclosed in this tag
<page label="XXXX" type="YYYY"> ... </page>: enclosed in <pages> </pages>, those tags describe one page with a label 'XXXX' of type 'YYYY'.
The following types are possible:
fields: a page with a list to select fields. It can enclose the following tags:
<name>xxxx</name>: will identify the 'result' in the script
<selection>nnn</selection>: default selection for the list nnn should be a number or 'all' (meaning every fields selected) it is also possible to select a range of fields starting from the end of the list with <selection type="last">nnn</selection>
records: a page to specify which records are to be printed. Enclosing: <name>xxxx</name>: (same purpose)
order: a page to specify how to sort the records Enclosing: <name>xxxx</name>: (same purpose)
misc: a page without a predefined purpose, enclosing different widgets. Enclosing:
<widget label="xxxx" type="yyyy">
<name>zzzz</name>
</widget>
xxxx: label before the widget (or for the widget if == label)
yyyy: filesel (File selection), label, checkbox, entry
zzzz: (same purpose)
Once again: refer to the existing plug-ins (and to gaby source code) for examples and explanations. (or send me a mail)