Mobile Data Studio Skills

Page 13: Data Management

Data - XML Outgoing (output/export)

XML (Extensible Markup Language) is a simple, platform independent method of storing structured information in text-based files. Mobile Data Studio can export data in the XML format to aid integration with other XML enabled software. This is particularly useful where different software programs may otherwise be a barrier to movement of data.

To set up an XML Output system, a target folder and filename must be selected. Although the target folder is static, the filename will be dynamically evaluated for each session passing through. It is necessary therefore to include variable placeholders in the filename that will evaluate to a unique name for each session or data set. The available variables are:

%pointIDname% - data from the session, associated with a point
%.guid% - a globally unique identifier used for tracking purposes
%.time% - the time (HH-MM) the data was saved
%.date% - the date (YYYY-MM-DD) the data was saved
%.unitID% - the Unit ID of the origin mobile device
For Example: Folder C:\Breathalyser
Filename: %NameDriver% %Road% %.date%.xml delivers - Jim Hall Coast Hwy 2019-09-22.xml
or
Another example: Folder C:\NewOrders
Filename: %Customer% %.guid%.xml may deliver - Ajax Printing 3D003828-980A-4E70-845A-31DAC4011BD0.xml, this is the same GUID/UUID found in the originating unique session in Mobile Data Studio.

Screenshot

Mobile Data Studio has two XML output modes: page grouped ('Treat pages as discrete elements') and ungrouped (default). In page grouped mode, the points on each page are grouped into a tag:

<NameOfPage>
  <FirstPoint>Data</FirstPoint>
  <SecondPoint>Data</SecondPoint>
</NameOfPage>
<AnotherPage>
  <ThirdPoint>Data</ThirdPoint>
</AnotherPage>

In ungrouped (default) mode , each point exists under the root level, and pages are ignored:

<FirstPoint>Data</FirstPoint>
<SecondPoint>Data</SecondPoint>
<ThirdPoint>Data</ThirdPoint>

In some cases it is helpful to have a schema document for all XML output generated by a particular project. A schema defines the format and acceptable content of an XML document. Mobile Data Studio has the capability to generate a schema for a project from within the configuration dialog, the schemas supported by available servers includes Microsoft BizTalk Server.

Images processed at Mobile Data Studio server via XML Outgoing can be returned to mobile clients via XML Incoming (see below). This process also works for Sketch points; the sketch data is saved in a '.bin' file which will reimport the correct sketch data to the Sketch point.

If XML Outgoing is not used as a primary session data management option, it can be used to generate backup copies of sessions which, if required, can subsequently be recovered via XML Incoming (see below).

Data - XML Incoming (input/import)

A second tab in the Data Pathway dialog box, Incoming supports automatic processing of sessions received from other applications in the XML format. Using this method, Mobile Data Studio can be fully integrated into a larger solution that both provides data to and accepts data from mobile client devices.

To enable the XML Incoming session input system, a source folder and filespec need to be specified. The source folder is where the Mobile Data Studio server will look for new XML documents. The filespec, which by default is *.xml, specifies the type of file to look for. When Mobile Data Studio finds a file in the source folder that matches the filespec, it will parse it. Where multiple projects are utilising XML Incoming, each project must have its own source folder.

Screenshot

Settings for Smartphone clients to receive sessions from Mobile Data Studio server, eg via a 3G/4G or GPRS mobile phone network; when mobile clients are not connected the sessions will be stored and marked for dispatch when a connection is made by the client.

Databases (eg Access, SQL Server) will usually require a target XML schema in the folder to which XML is being sent and checked by Mobile Data Studio every 10 seconds for XML Incoming. An appropriate XML schema is simply an XML file generated by Mobile Data Studio via XML Outgoing for the same project. To ensure incoming sessions are unique, the XML Incoming must include a Universal Unique Identifier such as when a session is first created in Mobile Data Studio (eg mobile-data UUID DC02C801-A461-45E4-A93A-05777310AC15). If the mobile-data UUID is omitted from XML, then Mobile Data Studio will generate a UUID. Where images from Sketch points are being returned to mobile clients the correct '.bin' file generated via XML Outgoing must be included.

Once incoming sessions have been parsed, they can either be (1) stored or queued in the internal Data Window as 'Marked for Send' (see above) for automatic dispatch when wireless mobile client devices log in or Synchronise from the mobile device via a TCP/IP network, or (2) be automatically or manually dispatched (see below) to one or more mobile devices via the wireless TCP/IP network, or (3) be manually sent from the Data Window to a connected mobile devices via ActiveSync.

In general, for most wireless operations controlled from the client mobile device via either 'Synchronise' or 'Send Now', the settings should be as for the first XML Incoming set up shown above, ie 'Store incoming sessions in the internal Data Window' plus 'Mark new sessions as queued for subsequent dispatch'. The settings shown below are appropriate for a wireless local area network.

Screenshot

Settings for Mobile Data Studio server to send sessions directly to mobile clients, eg via a 'WiFi' LAN within a hospital, factory or warehouse where clients are generally always connected

Where a specific target Unit ID needs to be specified, for example where an incoming session is to be dispatched to a specific mobile device, an extra element can be included in the XML document: <UnitID>my_unit_id</UnitID> . This will be included if an Outgoing XML file for the same project is used as the target XML schema.

Note that once an Incoming session has been successfully processed, the source file will be removed from the file system. If an error occurs and the session cannot be processed, or cannot be dispatched to the appropriate mobile device, the source file will remain either until the problem is corrected, or failing that, indefinitely.

Note: (a) The XML Incoming session options require MSXML, which can be obtained from Microsoft and is a component of later versions of Internet Explorer. If problems are experienced using these features, download and install the MSXML components. (b) The target folder for XML Incoming should have Security Permissions set to 'Full Control' for read, write and execute; if processed XML is not automatically deleted in the target folder then repeat sessions may be sent to mobile clients.

Export Session Data as KML and KMZ files for Maps

Session data containing GPS values can be processed to KML and KMZ files to display data and images in Google Earth and other mapping media. A KMZ file can contain images, whereas a KML file doesn't contain images. Shown below is the KML/KMZ Output Options window for KLM/KMZ files and part of a displaying screen in Google Earth in Windows 10. For Google Earth, the format used in the GPS point must be decimal Latitude (%lat%) and decimal Longitude (%long%). If images are to be output in KMZ files then the Filename should be specified as .kmz. Sessions can be grouped in the Database Window to Export either a KML or KMZ file which will display multiple GPS locations and associated data. Individual sessions can be automatically processed to KML/KMZ via the Data Pathway alongside data using ADO to databases and XML Outgoing.

Screenshot

KML files can be sent to Android, Apple iOS and Windows 10 mobile devices via email and programs such as Dropbox, and via the File point in Android and Windows 10. Note that to open KML files in Android transported via the File point the KML Filename may require to be without spaces. KMZ files display associated images in Google Earth in Windows on a desktop or laptop PC; however, images will not display in Apple iOS or Android. An example below shows a KML file generated from the Bushfire Ready Map project ( in C:\Program Files (x86)\Mobile Data Studio\Examples) displayed on an Apple iPad with the Title Point being the 'Occupant Response Preference' to either 'Stay' or 'Go' in response to a bushfire. Similarly, session data processed to KML in a survey of maternal and child health in a developing country could show which dwellings had a child under the age of five years. A survey of electricity power poles in a network could show which poles required priority maintenance. A tap on the marker pin then shows full information.

Screenshot

Below is an example of export of a session to KMZ file and display in Google Earth in Windows 10, using the Track Assets project (in C:\Program Files (x86)\Mobile Data Studio\Examples). A single image is shown; however, multiple images are supported within a KMZ file.

Screenshot

Please see further information on use of KML and KMZ files at the Bushfire Ready Map page. Please NOTE that while display of KML files in Google Earth is optimal when a mobile device is connected to the Internet, Google Earth can operate offline with cached maps.

Screenshot PROJECT BACKUP AND VERSION:
  • Projects developed in Mobile Data Studio are valuable, thus it is important to securely store a backup copy of the Project .ppc file before deployment.
  • After deployment, it is also important to periodically make a backup copy of the related Project .ppc, Data .ppd and Data Pathway .ppr files.
  • Keeping track of versions of the Project .ppc file is also important. This can be assisted by displaying the version and date of the version in a Layout point on the first page of the project.
Previous Page Jump to page:   Next Page