Description of the XML format for import of data into FAB Subtitle Database

The list of subtitled programs can be imported into FAB Subtitle Database using a watchfolder. An XML file with the correct content must be stored into a watchfolder and will then be imported directly into the database.

The XML Format

The XML document that is being imported must start with a document node <STTDB version="3”>. The data for each network must be stored inside a <Playlist> subnode which has following attributes defined:

Name Description
network The network name (i.e. ZDF, TVE1 or similar).
start The start of the exported interval in yyyy-mm-ddThh:mm:ss.zzz format.
end The end of the exported interval in yyyy-mm-ddThh:mm:ss.zzz format.

All three attributes are obligatory. When the file is imported, all programs which are present in the database for the selected network and are not present in the XML file, will be deleted. The detection of the presence of a program in the database is using the UniqueID. Every program has its own UniqueID identifier which must not change when the program is moved. A repetition of the same program must have its own UniqueID and must not use the UniqueID of the original program.

Every <Playlist> node contains <Item> subnodes, each holding data for one playlist entry. Every database field is stored as a subnode inside the <Item> node. The following subnodes are defined:

Name Description
<DateTime> Playlist entry date and time in yyyy-mm-ddThh:mm:ss format.
<AutomationID> Automation ID or VPS.
<UniqueID> Unique identifier, generated by another system. Can be used for connection with other systems. FAB Subtitle Database will never add, modify or delete this identifier. The only way to set it is via the XML import file.
<Description> Program description.
<Duration> Program duration in hh:mm:ss format.
<SubtitleFiles> Names of subtitle files, each inside its own <File> subnode. If a file with this name exists in the same folder as the XML import file, the subtitle file will be imported into the database.
<Repeat> Information on repeating program (if the entry is marked as repeated). Contains subnodes <EndDate> (if end date is specified) and <Days> (on which days this program is repeated; encoded as numbers: Monday = 1, Tuesday = 2, … Sunday = 7).
custom fields All defined custom fields, each as its own node. Custom field’s XML Name parameter is used as a node name, if set; otherwise then custom field name is used.

Example of an XML import file

<STTDB version="3">
  <Playlist network="ZDF" start="2005-02-01T00:00:00" end="2005-03-03T00:00:00">
    <Item>
      <UniqueID>BC5EB0CF68812B41</UniqueID>
      <DateTime>2005-02-16T20:15:00</DateTime>
      <AutomationID>82910</AutomationID>
      <Description>Ein Fall für zwei</Description>
      <ProductionNumber>51152160</ProductionNumber>
      <OrigProductionNumber>51100705</OrigProductionNumber>
      <Duration>00:42:36</Duration>
      <Repeat>
        <Days>014</Days>
        <EndDate>2005-06-03</EndDate>
      <Repeat>
    </Item>
    <Item>
      <UniqueID>BC5EB0CF68812B42</UniqueID>
      <DateTime>2005-02-16T20:45:00</DateTime>
      <AutomationID>82911</AutomationID>
      <Description>Ein Fall für drei</Description>
      <ProductionNumber>51152161</ProductionNumber>
      <OrigProductionNumber>51100706</OrigProductionNumber>
      <Duration>00:42:37</Duration>
    </Item>
  </Playlist>
  <Playlist network="3SAT" start="2005-02-01T00:00:00" end="2005-03-03T00:00:00">
    <Item>
      <UniqueID>BC5EB0CF68812B41</UniqueID>
      <DateTime>2005-02-16T20:15:00</DateTime>
      <AutomationID>82910</AutomationID>
      <Description>Ein Fall für zwei</Description>
      <ProductionNumber>51152160</ProductionNumber>
      <OrigProductionNumber>51100705</OrigProductionNumber>
      <Duration>00:42:36</Duration>
    </Item>
    <Item>
      <UniqueID>BC5EB0CF68812B42</UniqueID>
      <DateTime>2005-02-16T20:45:00</DateTime>
      <AutomationID>82911</AutomationID>
      <Description>Ein Fall für drei</Description>
      <ProductionNumber>51152161</ProductionNumber>
      <OrigProductionNumber>51100706</OrigProductionNumber>
      <Duration>00:42:37</Duration>
      <Repeat>
        <Days>014</Days>
        <EndDate>2005-06-03</EndDate>
      <Repeat>
    </Item>
  </Playlist>
</STTDB>