DigiGuide Logo

Home » Developer Area » DigiGuide Markers » XML file

XML file

XML may sound complex but in practice it's quite simple. dgmarker files must be valid XML.

Here's the overview of the contents of a DGMarker file:

<markertemplates  version="0" >
	<template name="Sample Marker" id="200917371;" searchterm=":Sample">
		<keycommands>
			<keycommand command="ToggleSample" code="OnToggleSample();"/>
		</keycommands>

		<code>
		</code>
	</template>
</markertemplates>

What does it all mean

markertemplates
This is the container for markers. Marker template files must contain just one of these. It has only one attribute of "version" and it should be set to "0"
template
This is the begining of an individual marker. There can be any number of these within the markertemplates tag
It has three attributes:
name - Name of the marker type
id - Unique ID
searchterm - Term that will be used when a user searches for programmes matched with this marker
keycommands
This is a container for keycommand tags. It is optional.
keycommand
This allows you to specify an action to be associated with commands. Commands can then be added to menus, toolbars and keyboard shortcuts
It has two attributes:
command - Unique name for the command
code - Function or code to run when the command is executed.
code
This is a container for the JavaScript code.