» Widgetplus API
API's / XML interface / Intro



Xml INterface, or XIN, means that the application is formatted as XML and then loaded into a XML runtime on the server, which remembers what has been loaded into it indefinitly.
Whenever the XML in this runtime is changed, it stays changed permanently.
So, when a user asks for the app the next time, the new and updated XML is returned.

For this example, create a XML file (use this file) and upload it to your site, and then add the following to your webpage.
Look under Create / for details on how to format a xin.widget_call().

<div id="[id]"
onready="xin.widget_call([url],
[func()],
[id],
[id],
[data]
)" >
</div>

This loads the application into the serverside xml runtime, which hereafter can be called from any website or blog as a widget.
The runtime will deliver different instances for different accounts - one runtime thread per user.
Each thread (or runtime) has it's own history of changes.
You dont have to do anything for this to happen - it happens automatically.
After the app has been initiated, if persistent, you can remove the original source file, since it's not being used any more.


Setting the [data] to 1 makes the app persistent, omitting the value makes it 'normal', meaning that it 'resets' after each session.
Setting it to 2 means that everyone can see it, and that it's the same across all accounts. (which is exactly what the system messages / chat does)



Once created, the app responds to serverside calls regardless if it's present on the page locally or not - below are some examples.

The text value returned from a webservice call:


The style attribute returned from a webservice call:


The style value 'border' returned from a webservice call:


Set text color
Set text
Set border color
Set border type