*/ ?>
Focus on XML lists

List are essential for structuring a mobile app. We already explained how to create a list online and change it in real time through mvsappmobile.com portal. This is a very simple way for keeping up-to-date data displayed in your app.

If the information to be displayed comes from a structured data source, you should consider exporting this data regularly to a file, put this file online and configure its URL once for all in AppMobile. For future exports, you will just have to replace the file online by the new export, and the updated data will be immediately available in you mobile apps.

Much better, if you data is stored in an online database, a very simple script will generate the XML list on the fly, you just have to configure the URL of this script in AppMobile and it's done. In practice, this must be the case if you already have a website running.

In both cases, let's begin with a description of the XML format for AppMobile lists.

General format description

An example of XML file: the following defines a list of 3 items.

<?xml version="1.0" encoding="UTF-8"?>
<items version="1.0" type="1" reload="1" locate="1">
	<!-- items
		type : 1 = standard list
		reload : 1 = Reload each show, 0 = No reloading  
		locate : 1 = User can locate the list, 0 = User can't locate the list -->
	<item type="1">
		<!-- item
			type : 1 = item with image, 2 = item without image -->
		<img>http://image1.notulus.com/photos/article_news/Concorde2014_100x75.jpg</img>
			<!-- Image should be 80x60px for correct display -->
		<txt1>Concorde</txt1>
		<txt2>Nouvel EP</txt2>
		<txt3>Musique</txt3>
		<link type="1" url="http://www.notulus.com/iphoneV2/iphone_affiche_news.php?id=3917" title="News - Musique"/>
			<!-- link type : 1 = url to html content, 4 = url to xml sub-list -->
	</item>
	<item type="1">
		 <img>http://image1.notulus.com/photos/article_news/FestivalGerardmer2014_100x75.jpg</img>
		 <txt1>Festival de Gérardmer</txt1>
		 <txt2>Palmarès</txt2>
		 <txt3>Cinéma</txt3>
		 <link type="1" url="http://www.notulus.com/iphoneV2/iphone_affiche_news.php?id=3914" title="News - Cinéma"/>
	</item>
	<item type="2">
		<img/><!-- no image for item type = 2 -->
		<txt1>Nos coups de coeur à l'affiche</txt1>
		<txt2>Cinéma</txt2>
		<txt3>(sous-liste)</txt3>
		<link type="4" url="http://fpierrat.fr/xml/exemple/sous-liste-exemple.xml" title="A l'affiche"/>
	</item>
</items>

The file structure is really simple. The list is represented by a <items> element, which contains one <item> node for each entry of the list.

Each item contains an <img> thumb, one, two or three text lines (<txt1>, <txt2> and <txt3>) and one <link> which defines the action to be taken when the user taps on this entry in the list.

You can have links pointing either to a HTML page, or to a XML sub-list.
(cf. attribute <link type="...">)

The attribute <item type="..."> also covers specific needs, like adding items to a shopping-cart:
    

Note:The structure described above refers to an <items version="1.0"> list.
To group items in sections, use an <items version="1.1"> list (detailed specifications follow for both variants).

The <items> element

Content

A list of <item> elements (version 1.0) or <section> elements (version 1.1).

Attribute : "version" :

Attribute : "type" :

Attribute : "reload" :

To avoid unnecessary server communication delays, "reload" should be set to "0" for static lists, or dynamic lists based on an unfrequently updated data sources.
"reload" should be set to "1" only for dynamic lists based on frequently updated data, or lists whose contents may be modified by user's actions (a shopping cart should always be reloaded for instance).

Attribute : "locate" :

The <section> element

The <section> element is only defined in version 1.1 (version="1.1" attribute of <items>).
It is mandatory: an <item> element cannot be placed directly in the <items> element in version 1.1, it must be placed in a <section> element.
It is aimed at displaying grouped blocks of <item> elements: articles by categories, news by themes, etc....

Content

A list of <item> elements.

Attribute : "title" :

This is the text of the heading that will be displayed for this section.

The <item> element

Content

The <item> element contains following child nodes :

Attribute : "type" :

The <link> element

Content

The<link> element is empty.

Attribute : "type" :

Attribute : "url" :

The "url" attribute contains the URL that is called when the user selects this item in the list.

Attribute : "title" :

The "title" attribute contains the text that will be shown in the title-bar of the called page (HTML page or XML sub-list).