Viz Multichannel

Version 4.0 | Published January 23, 2019 ©

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

To Map Primary and Secondary Events

  1. Start Viz Multichannel

  2. Open the Settings window

  3. Select your channel

  4. Select Primary Mapping Settings

    • See examples below on how to set the paths before

  5. Under the XML Import Settings set the parameters Path Of Main Event Nodes and Path Of Secondary Event Nodes to the main events’ 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 "/".

  6. Check the Secondary events located inside main events check box if the Secondary events are nested inside primary events

  7. Set the parameters Channel node location and Date node location to value XML root or Secondary Events Nested inside Primary Events according to the XML format.

  8. Map each field relatively 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. Your mapping for both events under the 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. Your mapping for both events under the 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: Having 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 Primary Mapping Settings section will be as follows:

  • channel: /general_info/channel_name/ (ensure Channel name is defined at the root level setting in the XML Import Settings section)

  • date: /general_info/date/ (ensure Playlist date is defined at the root level setting in the 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>