Skip navigation links
The powerful and versatile time tracking system!
Menu
TimeTraces
The powerful and versatile time tracking system!

XML file specification

Introduction

When you save your projects to XML files, they can also be read and written by other applications that support reading and writing to a custom XML format.  Do make sure however that these applications read and write according to the XML specification listed below, otherwise the project data might get corrupt.  It is always safe to first make a backup copy of your project files when you try out exchanging data with other applications for the first time.

XML specification

The XML specification is as follows:

<TimeTracesProject> tag

This is the root tag.  It may contain an arbitrary number of <Activity> subtags.  Tag content specification:

  • "name" attribute: the name of the project.
  • "version" attribute: the file version of the project file.  The only valid value is "0.0.0.1" (the current version).  This version is also equal to the minimum TimeTraces version needed to read the XML file.
  • 0 or more <Activity> subtags: all activities at the root level.

<Activity> tag

This tag represents a single activity.  It can have an arbitray number of <Activity> and <TimeTrace> subtags.  Tag content specification:

  • "enabled" attribute (optional): whether the activity is enabled.  Omit this attibute if the activity is disabled.  The exact value of the attribute is irrelevant.
  • "name" attribute: the name of the activity.
  • 0 or more <Activity> subtags: all sub activities of this activity.
  • 0 or more <TimeTrace> subtags: all time traces registered on this activity.

<TimeTrace> tag

This tag represents a single time trace.  The start and end date and time are formatted as yyyy-mm-dd hh:mm:ss.  Tag content specification:

  • "end" attribute (optional): the end date/time of the time trace.  Do not specify this attribute if the time trace is open (still registering time).  Only one time trace can be specified as open.
  • "start" attribute: the start date/time of the time trace.

General notes

  • TimeTraces internally stores its date/time information in UTC (Universal Time Coordinates).  This means TimeTraces can handle daylight savings time transparently and correctly.  The date and time information in the XML files must thus also be specified in UTC.
  • Unrecognized tags and attributes are skipped by TimeTraces.  When a recognized tag doesn't have the required attributes and/or data format, TimeTraces assumes the project data file is corrupt and stops loading it.
  • XML files are case sensitive.  When dealing with TimeTraces project files, make sure that the case complies with the above specification.

XML file example

Below is an example of what a TimeTraces project file looks like when saved in the XML format.  The line lay-out is somewhat modified so the example displays nicer on this help page.

<TimeTracesProject
  version="0.0.0.1"
  name="IT services"
>
  <Activity
    name="Client one"
    enabled="true"
  >
    <Activity
      name="Marketing"
      enabled="true"
    >
      <TimeTrace
        start="2010-01-16 09:51:22.189Z"
        end="2010-01-16 10:12:41.523Z"
      />
    </Activity>
    <TimeTrace
      start="2010-01-18 12:47:33.471Z"
    />
  </Activity>
  <Activity
    name="Client two"
    enabled="true"
  >
    <TimeTrace
      start="2010-01-03 15:51:48.278Z"
      end="2010-01-03 17:40:37.630Z"
    />
  </Activity>
  <Activity
    name="Client three"
  >
  </Activity>
</TimeTracesProject>