Visit BoonEx Page at Facebook

Facebook

Join BoonEx group at LinkedIn

LinkedIn

Follow BoonEx on Twitter

Twitter

Subscribe to BoonEx Blog RSS feed

RSS

Creating XML Server application

XML Server is the engine that handles user’s queries, and connects the necessary application depending on query and returns an XML-formatted reply. The core of XMLS is "ray/XML.php" file. It includes a global module with necessary XMLS methods including database interface functions and global API functions for common use. The usual XML query structure is:

http://[your_site]/[ray_folder]/XML.php?module=[widget]&action=[action]&[param1]=[value1]&[param2]=[valueN]...&[par
amN]=[valueN]

where

your_site – your site domain,

ray_folder – Ray home folder (ray by default),

widget – your widget system name (widget folder name),

action – your widget XMLS method name,

param1, param2, … paramN – parameters passed to the method,

value1, value2, … valueN – parameters values.

All queries must to refer to XML.php, which requires all files from "inc" directory in your widget package ("module" variable ) and passes all other variables to "modules/[your_widget]/inc/actions.inc.php".

You can organize the global "switch($sAction)" block in this file (for example see "demo2/inc/actions.inc.php"). Some actions could return a result as an XML document.

In this case, you can use "parseXml" and "makeGroup" API functions along with XML templates from "[your_widget]/inc/xmlTemplates.inc.php" (see "API functions listing" section).

All your system variables (such as paths, urls – everything that is not changed). you should store in "[your_widget]/inc/header.inc.php", other variables that webmaster can change, you should store in [your_widget]/xml/config.xml" file (see demo examples and "Widget settings" section). You can use "global" module functions (API functions) in your XML Server application.