Viz Channel Branding User Guide
Version 5.2 | Published June 05, 2024 ©
Importing from XML
The Any XML file import module supports any XML structures that are available for playlist information with the following features:
-
Reading values from any node’s text or from any node’s attributes.
-
XML containing primary events only or both primary events and secondary events.
-
Secondary events structured at the same level as the primary events or secondary events nested inside each primary event.
-
Reading the channel name and playlist date from every primary event or from one external location taken by path relative to the XML root.
Note: All the settings mentioned in the following procedure are located in the Mapping Settings.
Map Primary and Secondary Events
Map Primary and Secondary Events
-
Open the Settings window and scroll down to Schedule Import section .
-
Select Mapping Settings.
See examples below on how to set the paths in advance. -
Under Any XML Import Settings set the parameters Path of Primary Event Nodes and Path of Secondary Event Nodes to the main event's path relative to the XML root.
-
Do not include the XML root node in the path and/or the secondary event nodes’ path relative to the main event node.
-
Do not include the root/main event node in the path.
-
Start the path with the "/" character but don’t end it with "/".
-
-
Check the Secondary events Nested inside Primary Events box if the Secondary events are nested inside primary events.
-
Check the parameters Channel name is defined at the root level and Playlist date is defined at the root level if these values are at the root level according to the XML format.
-
Map each field relative to the main/secondary event node.
-
Start the path with the "/" character, and do not include the main/secondary node name in the path.
-
If the field value is a node’s text, end the path with the "/" character.
-
If the field value is an attribute, write the path, then the "/" character and then "@" with the attribute name.
-
Secondary Events at the Same Level as Primary Events
The following example shows a one-level XML where the secondary events are placed at the same level as the primary events. Mapping for both events under the Any XML Import Settings section will be as follows:
-
Path of Primary Event Nodes: /event
-
Path of Secondary Event Nodes: /event
<playlist>
<event>
…
<type>MAIN</type>
</event>
<event>
…
<type>SECONDARY</type>
</event>
<event>
…
<type>MAIN</type>
</event>
…
</playlist>
Secondary Events Nested Inside Primary Events
The following example shows a two-level XML where the secondary events are nested inside the primary events. Mapping for both events under the Any XML Import Settings section will be as follows:
-
Path of Primary Event Nodes: /primary_event
-
Path of Secondary Event Nodes: /secondary_events/secondary
<playlist>
<primary_event>
…
<secondary_events>
<secondary>…</secondary>
<secondary>…</secondary>
</secondary_events>
</primary_event>
<primary_event>
…
</primary_event>
</playlist>
Channel Name and Playlist Date in a Separate Node
The following example shows how to map the channel name and the playlist date when those tags are placed in other nodes than the default primary element nodes.
Note: Keeping the playlist date separate limits the playlist to one broadcast day.
Note that the following example mapping requires you to set an absolute path for the channel name and playlist date in your mapping table. Your mapping table under the Mapping Settings section will be as follows:
-
channel: /general_info/channel_name/ (ensure Channel name is defined at the root level setting in the Any XML Import Settings section)
-
date: /general_info/date/ (ensure Playlist date is defined at the root level setting in the Any XML Import Settings section)
-
begin: /begin_time/@time
-
duration: /duration/@time
-
description: /title/
-
type: /type/
<playlist>
<general_info>
<channel_name>…</channel_name>
<date>…</date>
</general_info>
<event>
<begin_time time=”…” />
<duration time=”…” />
<title>…</title>
<type>MAIN</type>
</event>
</playlist>