Description
A Template File represents a block of XML elements used for merging with segment data that, combined together, will create a nested XML file. It defines the XML output format that will be used when the data is merged.
A sample template file configuration is shown below for a User Domain.
In This Article
- What is a Template File?
- When should a Template File be created?
- How do Template Files Work?
- Template Parameters
- Template Icons and Buttons
When Should a Template File be Created?
- Whenever a user wants to create a specific XML output format when merging segment data to generate Nested XML.
Template Tab
The Template Tab within the Domain Dashboard may be used to create, view, download, and manage XML Template Files for the selected Domain.
Once a Template File has been created, users can preview, edit, delete, and download it to their local machine.
How do Template Files Work?
- Create a Template File for the Domain
- Enter Tag, Header, Body, and Footer Information.
- Click the Save button.
- Download the Template File to your Local Machine
Note: For a complete configuration example for nested XML, see the XMLSegmentMergeReceiver article.
Sample Organization Template File
<template> <header> <line><![CDATA[<?xml version="1.0" encoding="UTF-8"?>]]></line> <line><![CDATA[<organization id="@id@">]]></line> </header> <body> <line><![CDATA[<name>@name@</name>]]></line> <line><![CDATA[<address>@address@</address>]]></line> <line><![CDATA[<city>@city@</city>]]></line> <line><![CDATA[<state>@state@</state>]]></line> <line><![CDATA[<zipCode>@zipCode@</zipCode>]]></line> <line><![CDATA[<webAddress>@webAddress@</webAddress>]]></line> </body> <footer> <line><![CDATA[</organization>]]></line> </footer> </template>
Template File Parameters
A Template File contains the following parameters:
Parameter | Description |
Tag | Defines a unique name that represents a Domain within the configuration file. |
File Name | Defines file name for the XML Template file. |
Header | Defines Attributes to tag in the XML formatted header. |
Body | Defines Attributes to tag in the XML formatted body. This will be repeated N number of times within the header and footer where N represents the loopCount. |
Footer | Defines Attributes to tag in the XML formatted footer. |
Icons and Buttons
The following icons and buttons are available for Template Files:
Icon/Button | Description |
Save a new template or any changes made to a Template File. | |
Preview a Template File. | |
Edit a Template File. | |
Delete a Template File from a Domain. | |
Download a Template File to your local machine for test data generation. |