<AppML>Reference Manual
<AppML> Data Model:
<datasource>
Datasource definition goes here
</datasource>
<filters>
Filter definitions goes here (if any)
</filters>
<update>
Update definitions goes here (if any)
</update>
<anything>
Anything you want to add to the model
</anything>
</appml>
<AppML> Security
<AppML> security is configured through the security attribute in the <AppML> tag.
The beginning of the above application contains security definition attributes, which only allow "artists" users to log in.
In this case, the username used to log in must be a member of the "artists" group.
<datasource> Element
The <datasource> element of the <AppML> application defines 4 different data types:
Child Elements (only one can be used)
| Element | Description |
|---|---|
| <database> | Defines data type |
| <xmlfile> | Defines XML source file |
| <csvfile> | Defines a comma-separated text file |
<database> Element
The <database> element defines the database
Child Elements
| Element | Description |
|---|---|
| <connection> | Linked database name |
| <execute> | SQL statement executed before data retrieval (optional) |
| <sql> | SQL statement used to retrieve data |
| <maintable> | Main table of the application (optional) |
| <keyfield> | Key field of the main table (optional) |
Data Stored in SQL Database
This is the most common solution for data-oriented applications.
<database>
<connection>CDDataBase</connection>
<sql>SELECT Artist, Title, Country FROM CD_Catalog</sql>
</database>
</datasource>
The above model can select three data options (Artist, Title, Country) from the "CD_Catalog" table in the "CDDataBase" database.
The number of rows returned in the result is unknown.
Data Stored in XML Files
<AppML> can read data from XML files:
Example
<datasource>
<xmlfile src="cd_catalog.xml.html">
<record>CD</record>
<item>
<name>Title</name>
<nodename>TITLE</nodename>
</item>
<item>
<name>Artist</name>
<nodename>ARTIST</nodename>
</item>
<item>
<name>Country</name>
<nodename>COUNTRY</nodename>
</item>
</xmlfile>
</datasource>
</appml>
Try it Yourself »
This method can store data in an XML file on the server.
Data Stored in Text Files
<AppML> can read data from text files:
Example
<datasource>
<csvfile src="cd_catalog.txt.html">
<item>
<name>Title</name>
<index>1</index>
</item>
<item>
<name>Artist</name>
<index>2</index>
</item>
<item>
<name>Price</name>
<index>5</index>
</item>
</csvfile>
</datasource>
</appml>
Try it Yourself »
This method can store data in a text file on the server.
You can create a database if needed
<AppML> You can create a database if needed:
<connection>CDDataBase</connection>
<execute>
CREATE TABLE CD_catalog (
CD_Id INT IDENTITY,
Title NVARCHAR(255),
Artist NVARCHAR(255),
Country NVARCHAR(255),
Company NVARCHAR(255),
Price NUMBER,Published INT)
</execute>
</database>
Perfect for rapid prototyping!
Other Extensions