XML Export in FAB Network Controller

FAB Teletext Network Controller can export all teletext pages as XML files. All teletext pages are exported into one folder and one XML file contains all subpages of a teletext page. The filename of the xml file with the teletext page starts with a letter (i.e. P) and is followed by the teletext page number. Exported files will therefore include P100.xml, P101.xml up to P899.xml. In addition, two more files are exported:

  • status.xml: contains the current status of every single teletext page including the number of subpages, the timestamp of last modification and the type of the page as defined in the TOP structure

  • toptext.xml: contains the TOP structure for the complete teletext service

Structure of the xml file with the teletext page

The xml file contains the node “teletext” which contains the node “page” Within the node “page” there will be one node “subpage” for every subpage of the exported teletext page.

The node “teletext” contains the following attributes:

  • network - contains the name of the network as defined in FAB Network Controller
  • xml:space=“preserve” - required because teletext is using spaces for text positioning

The node “page” contains the following attributes:

  • number - contains the teletext page number
  • name - contains the page name as defined in the TOP Structure
  • time - contains the timestamp of the last modification of the teletext page
  • subpagecount - contains the number of subpages
  • prevpg - contains the previous existing teletext page number
  • nextpg - contains the next existing page number
  • toptype - contains the type of the page as defined in the TOP structure (Normal/Group/Block/TVProg/Subtitle)

The node “subpage” contains the following attributes:

  • number - the subpage number of the content within this xml node
  • time - the duration of the display of the content within this xml node in seconds

The node “subpage” contains several nodes “content” with the same content in different representations which are defined by the value of the attribute “type”. Every teletext line is exported in a separate node “line” and the attribute “number” defined the teletext line number.

The content type “text” contains only text. All teletext control characters are replaced by spaces.

The content type “all” contains text and all teletext control characters. Teletext control characters with codes from 0 to 31 are replaced by keywords within {}.

Code Keyword Description
0 {Black} Text color black
1 {Red} Text color red
2 {Green} Text color green
3 {Yellow} Text color yellow
4 {Blue} Text color blue
5 {Magenta} Text color magenta
6 {Cyan} Text color cyan
7 {White} Text color white
8 {Flash} Flash on
9 {Steady} Flash off
10 {EB} End box
11 {SB} Start box
12 {NH} Normal height
13 {DH} Double height
14 {DW} Double width
15 {DS} Double size
17 {GRed} Graphics colour red
18 {GGreen} Graphics color green
19 {GYellow} Graphics color yellow
20 {GBlue} Graphics color blue
21 {GMagenta} Graphics color magenta
22 {GCyan} Graphics color cyan
23 {GWhite} Graphics color white
24 {Conceal} Conceal text
25 {CG} Contiguous graphics
26 {SG} Separated graphics
27 {ESC} Escape
28 {BB} Black Background
29 {NB} New background
30 {Hold} Hold graphics
31 {Release} Release graphics

The content type “structured” contains text and all necessary information regarding the representation of the text for every character. Every “line” node contains one or more “run” nodes. Every “run” node shall be displayed using the same foreground and background color. The following attributes are used in “run” nodes:

  • bg - contains the name of the background color
  • fg - contains the name of the foreground color
  • length - contains the number of characters that shall be displayed for this run
  • charcode - contains the hex number of the teletext character code used in the text of this run. This attribute is only present for characters with a graphic color (colors starting with g). Please check the teletext specification for a table of graphic characters.

The text within the “run” node is the text that shall be displayed using the specified background and foreground color.

Code Color name Description
0 black Text color black
1 red Text color red
2 green Text color green
3 yellow Text color yellow
4 blue Text color blue
5 magenta Text color magenta
6 cyan Text color cyan
7 white Text color white
16 gblack Graphics color black
17 gred Graphics color red
18 ggreen Graphics color green
19 gyellow Graphics color yellow
20 gblue Graphics color blue
21 gmagenta Graphics color magenta
22 gcyan Graphics color cyan
23 gwhite Graphics color white

The colors starting with the character g are teletext graphic colors. Special teletext symbols are defined for display in the teletext specification.

Structure of the status.xml file

The file status.xml contains the current status of every single teletext page including the number of subpages, the timestamp of last modification and the type of the page as defined in the TOP structure.

The xml file contains a node “teletext” with the attribute “name” specifying the name of the network as defined in FAB Network Controller Configuration. The attribute time specifies the time of export of the file status.xml.

The node “pages” contains one node for every teletext page number, i.e. “p100”, “p101”, … Every “page” node contains another “page” node with the following attributes:

  • name - contains the page name as defined in the TOP Structure
  • toptype - contains the type of the page as defined in the TOP structure (Normal/Group/Block/TVProg/Subtitle)
  • subpagecount - contains the number of subpages of the teletext page
  • time - contains the timestamp of the last modification of the teletext page

The node “toptext” contains the same structure as the file toptext.xml described further below.

Structure of the toptext.xml file

The file toptext.xml contains the TOP structure for the complete teletext service in a tree form.

The xml file contains a node “teletext” with the attribute “name” specifying the name of the network as defined in FAB Network Controller Configuration. The attribute time specifies the time of export of the file toptext.xml.

The node “toptext” contains one node for every teletext page number which starts a new TOP block or a new TOP group.

This page was last updated on 2025-11-05