Developer Documentation Library > Interviewer - Server > UNICOM Intelligence Interviewer architecture > HTML players > Standard HTML Player
 
Standard HTML Player
The standard HTML Player is a stand-alone component that takes XML Player output and renders HTML, and converts HTTP Post results to Player XML. The HTML Player can also optionally export the Player XML for the Question node directly into the HTML output (instead of rendering the XML as HTML). When question responses are submitted to the HTML Player, the responses can be submitted as Player XML within the HTTP POST.
The HTML Player can be hosted on a web server in the Web tier and in UNICOM Intelligence Professional.
The HTML Player initiates the following tasks:
1 Renders HTML from Player XML by:
loading the Player XML
loading the layout template that is specified in the Player XML. The layout template is loaded from the template location set for the player. If translated templates exist, the template for the language that is specified in the Player XML is loaded. If no layout template is specified, the default template is loaded.
converting each of the elements in the supplied Player XML to HTML
inserting the HTML representation of the Player XML into the layout template
inserting the interview session token (a code that uniquely identifies an interview) into the rendered HTML as a hidden form field. The mrPage tag is used as the insertion point for the hidden form fields.
2 Creates Player XML for the interview post back. The post is generated from the HTTP Post string.
The HTML Player can optionally export the Player XML directly into the HTML output:
The HTML Player can export the Player XML for the Question node directly into the HTML output through the ControlType enumeration for the IQuestion.Style.Control.Type property. When the page is submitted back to the HTML Player the response is submitted as XML for all questions with a ControlType ofctXML.
The ctXML ControlType can be applied to any question type (qtSimple, qtBlock, qtPage, and so on)
The tag has a name attribute that corresponds to the full question name, which is appended with a _R to indicate raw XML (for example,_QGender_R).
The template for the HTML page takes the XML from the textarea, hides it the text area, and then renders the Question XML. When it is ready, or when the Next navigation is pressed, it replaces the Question XML in the text area with the question response XML.
When the HTML Player encounters a _R suffix for any question name, when is processes the post response, it takes the contents of the text area and use it directly within the response XML. If the content of the textarea is not valid response XML, it is treated as plain text.
It is possible to use this feature in the UNICOM Intelligence Author application when a script item is added. For example:
QuestionName.Style.Control.Type = ctXML
For more information, see HTML Player: Example XML.
See also
HTML players