Any XMS application has a client side. $GLOBAL["HTMLPARSER"] is an instance of awsXMS class and the document inside is built from the client element of the application.
For HTML applications, client/header is translated to html/head and client/content to html/body (via XSLT).
When sending the document to the userspace, XMS is using the xsl file given by the outputxsl attribute of app (root node of XMS apps). Default value of outputxsl is xsl/aws2html.xsl so, by default, your application is a HTML one.
In case you need an XML application, either you remove outputxsl attribute (and the result will be client/header and client/content) or you can give your own XSL file to transform the XML into desired structure.
Another attribute of app element is outputdisbled. When set to TRUE, XMS will not output $GLOBALS["HTMLPARSER"] and leaves you the choice to print anything else you need, like json or text (using echo or any php instruction that outputs to STDOUT) or nothing (well, most of these applications record something or alter the session vars or just redirect to other places).
$GLOBALS["TEMPLATE"] is an instance of awsXML of your application and is used by XMS Applications engine (temp.php) to create the client document and execute the directives, filters and parsers on it.
An XMS application consists of:
Additionaly, Designer will create a bookmark element to store the bookmarks in order for the programmer to find the key parts of the application easily. I am also using templates element to store diferent parts of the application and import them later, from the current application or any other.
To make it easier for the programmers, Designer has an very usefull feature Load rules, found in Runtime Options dialog. Load rules has some document maps to load and follow, including XMS app template. This will guide you to create the applications by throwing messages if a new element is allowed or not when you create it.