XML Data Format for the Generic Input Data Link

The Generic Input Data Link can receive data messages in a simple XML format. Each message must conform to one of the message definitions defined in the Tracking Server Manager. The message’s XML text should consist of a <MESSAGE> element made up of a set of <FIELD> elements containing the data. The <FIELD> elements must be in the same order as the fields in the message definition.

Assume that Tracking Server has a message definition named Vehicle and it is composed of the following fields with the associated data types:

Message Definition Name: Vehicle

Field Name

Data Type

SHAPE

Point

License_Plate

String

Date_Time

Timestamp

The following is an example of what three data messages might look like for this message definition in XML data format for the Generic Input Data Link:

<MESSAGE ID="Vehicle">
<FIELD>-116.38976478523308,32.61191112061326,0</FIELD>
<FIELD>C893HKV</FIELD>
<FIELD>3/19/2010 8:35:20 PM</FIELD>
</MESSAGE>
<MESSAGE ID="Vehicle">
<FIELD>-116.38976478523308,32.61191112061326,0</FIELD>
<FIELD>C893HKV</FIELD>
<FIELD>3/19/2010 8:35:25 PM</FIELD>
</MESSAGE>
<MESSAGE ID="Vehicle">
<FIELD>-116.38976478523308,32.61191112061326,0</FIELD>
<FIELD>C893HKV</FIELD>
<FIELD>3/19/2010 8:35:30 PM</FIELD>
</MESSAGE>

Notice that the field names don't appear in the XML data anywhere. The data values for the appropriate fields must be listed in the correct order to be interpreted correctly by Tracking Server.

TipTip:

The <MESSAGE> tag has an ID attribute that uniquely identifies which message definition the message conforms to. The ID attribute may be either a name or a globally unique identifier (GUID). You can obtain the GUID for your message definition from the Message Definition tab on the Tracking Server Manager dialog box. If the ID attribute is not present, the data link will assume it to be the same as that of the previous message. Any number of messages may be sent per connection; it is up to the program sending the messages to terminate the connection.

The following message definition field types are supported by the XML format:

For all field types, the <FIELD> element text should contain no spaces, except for string and date formats. The Object field type is currently unsupported.

Assume that Tracking Server has another message definition named MySampleDataDefinition, and it is composed of a single field from each of the data types above. If the fields in the message definition are listed in the same order as shown above, then an XML message might look similar to this, regardless of what the names of the fields are in the message definition:

<MESSAGE ID=”MySampleDataDefinition”>
<FIELD>123</FIELD>
<!—Integer—>
<FIELD>1.23</FIELD>
<!—Double—>
<FIELD>12/31/2002 12:00:00 AM</FIELD>
<!—Timestamp—>
<FIELD>This is a string</FIELD>
<!—String—>
<FIELD>This string has at most 64 chars</FIELD>
<!—String 64:—>
<FIELD>This string has at most 256 chars</FIELD>
<!—String 256:—>
<FIELD>This string has at most 512 chars</FIELD>
<!—String 512:—>
<FIELD>TRUE</FIELD>
<!—Boolean:—>
<FIELD>1.2,3.4,5.6</FIELD>
<!—Point Geometry: (x,y,z)—>
</MESSAGE>

Special Considerations for Polylines and Polygons

The XML Data Format for the Generic Input Data Link supports the use of GML to define polyline and polygon shape types. The data link does not support namespace use in subelement names. For more details on GML, refer to the Open Geospatial Consortium’s Geography Markup Language Specification.

8/28/2015