Description
The XMLSegmentMergeReceiver merges from two or more segmented data files generated from the SegmentDataCreatorReceiver into one or more nested XML formatted files.
Note: The format of the XML output is determined by reading a configuration file and one or more XML templates, which are referenced from within the configuration file.
In This Article
- When should this Receiver be used?
- Are there any limitations to the nesting depths of the files?
- Are any additional items required to use this Receiver?
- List of Steps to Generate Nested XML
- Receiver Parameters
- Receiver Attribute Property Keys
- File Config Tab
- Directory Config Tab
- Template Files
- Configuration File
- Steps to Create Configuration File
- Example User Story
- Example Output Files
When should this Receiver be used?
- Any time you want to generate nested XML output.
- Any time you want to generate HTML.
Are there any limitations to the nesting depths of the files?
- GenRocket can generate nested XML files, and the nesting depths of the files are not limited.
- For one of our financial services customers, we generate a complex, nested XML data feed that is 40 layers deep and contains internal calculations, and GenRocket generates 20 million rows of this nested XML data to meet their specific requirements.
Are any additional items required to use this Receiver?
- SegmentDataCreatorReceiver- Must be assigned to each Domain, except the Merge Domain.
- Note: The XMLSegmentMergeReceiver should only be assigned to the Merge Domain that merges the generated segments.
- Note: The XMLSegmentMergeReceiver should only be assigned to the Merge Domain that merges the generated segments.
- Configuration File - Used to determine the XML output format.
- Template - Created for each Domain and referenced within the configuration file to determine the XML output format.
List of Steps to Generate Nested XML
- Set up a Project with Domains, Parent-Child Relationships, and Scenarios.
- For each Domain except the Merge Domain, complete the following:
- Assign the SegmentDataCreatorReceiver and configure it accordingly.
- Create a Template File (discussed later in this article)
- Create a Merge Domain with just an id Attribute
- Note: This may have already been done if Domains were imported.
- Add the XMLSegmentMergeReceiver to the Merge Domain and configure it, as discussed in this article.
- Create a Scenario Chain with all Domain Scenarios. Make sure the Merge Scenario is in the last position.
- Create a Configuration File as discussed in this article.
- Download the Scenario Chain to your local computer.
- Download the Configuration file to your local computer.
- Note: This is a zip file containing the configuration and Domain template files. It will need to be unzipped, and all files will need to be placed in the location defined here (see the image below):
- Note: This is a zip file containing the configuration and Domain template files. It will need to be unzipped, and all files will need to be placed in the location defined here (see the image below):
Receiver Parameters
The XMLSegmentMergeReceiver requires that the following parameters are defined. Items with an asterisk* are required.
- outputPath* - Defines the location to store the newly generated nested XML file(s).
- outputSubDirectory* - Defines the prefix name of subdirectories that are auto-created under the outputPath and then appended with a number.
- configPath*- Defines the location where the configuration file is to be stored.
- configSubDir - Defines the subdirectory under the configPath directory where the configuration file is to be stored.
- configName* - Defines the name of the configuration file.
- filesPerOutputSubDir* - Defines the number of files to be generated per output subdirectory.
- segmentPath* - Defines the path to the Segment directory where all segment subdirectories can be found.
- segmentSubDirectory* - Defines the subdirectory under the segmentPath where segment files can be found.
- overrideFileName - Defines the fileName, which will override the fileName provided in the configuration file.
- deleteOutputSubDir - Defines whether to delete the generated or an existing outputSubDir or not during the execution of the Scenario.
Receiver Attribute Property Keys
There are no property keys necessary for this Receiver.
File Config Tab
The File Config Tab is used to configure what event will trigger file creation and the naming configuration for generated files. Please click here for more information on how to use the File Config Tab.
Directory Config Tab
The Directory Config Tab is used to configure what event will trigger directory creation and the naming configuration for generated directories. Click here for more information on how to use the Directory Config Tab.
Template Files
Template files are created for each Domain. For example, if nested XML output is being generated for the following Domains, then there will be a minimum of three template files (one for each Domain):
<Organization> <Department> <User>
They can be created from within the Domain Dashboard for a chosen Domain by selecting the Template Tab and filling in the following information:
- Tag - Defines a unique name that represents a Domain within the configuration file (e.g., OrganizationTemplate).
- File Name - Defines the XML Template file name (e.g., OrganizationTemplate.xml).
- Header - Defines Attributes to tag in the XML formatted header (e.g., <organization id= "@id@">).
- Body - Defines Attributes to tag in the XML formatted body (e.g., <name>@name@</name>).
- Footer - Defines Attributes to tag in the XML formatted footer (e.g., </organization>).
Once finished, click the Save button to save your template. An example is shown below for an Organization Domain:
Note: More than one template can be created for a Domain. This is shown in the example provided later in this article.
Configuration File
The configuration file defines the following elements of information:
fileNameSegments - contains subelements that define how file names are created for each nested XML generated.
templateFiles - contains subelements that define the template file to read and an optional segment to read for the merge process.
segments - contains nested segments that define the nesting of the templates that will define the XML output.
This configuration file is created through the Project Dashboard > Management Pane > Configuration Management.
Configuration File Example 1
The following is a configuration file that contains the segment and template information for three Domains:
<Organization> <Department> <User>
Configuration File Setup in GenRocket
Configuration File
<config> <fileNameSegments> <fileNameSegment segmentType="Constant" value="Output"/> <fileNameSegment segmentType="Constant" value="-"/> <fileNameSegment segmentType="Counter" value="1"/> <fileNameSegment segmentType="Constant" value=".xml"/> </fileNameSegments> <templateFiles> <templateFile tag="OrganizationTemplate" templateFile="OrganizationTemplate.xml" segmentFile="Organization" domainName="Organization" partitionSegmentSubDir="" /> <templateFile tag="UserTemplate" templateFile="UserTemplate.xml" segmentFile="User" domainName="User" partitionSegmentSubDir="" /> <templateFile tag="DepartmentTemplate" templateFile="DepartmentTemplate.xml" segmentFile="Department" domainName="Department" partitionSegmentSubDir="" /> </templateFiles> <segments indentLevel="3"> <segment tag="OrganizationTemplate"> <segment tag="DepartmentTemplate" isList="true"> <segment tag="UserTemplate" isList="true"/> </segment> </segment> </segments> </config>
Configuration File Example 2
In this example, there are still three Domains. However, the Department and User Domains each have an additional template to format with these additional tags:
- Department Domain = <departments> </departments>
- User Domain = <users></users>
<organization> <departments> <department> <users> <user>
Configuration File Setup in GenRocket
Segment Configuration
<config> <fileNameSegments> <fileNameSegment segmentType="Constant" value="Output"/> <fileNameSegment segmentType="Constant" value="-"/> <fileNameSegment segmentType="Counter" value="1"/> <fileNameSegment segmentType="Constant" value=".xml"/> </fileNameSegments> <templateFiles> <templateFile tag="UserTemplate" templateFile="UserTemplate.xml" segmentFile="User" domainName="User" partitionSegmentSubDir="" /> <templateFile templateFile="UsersTemplate.xml" tag="UsersTemplate"/> <templateFile tag="OrganizationTemplate" templateFile="OrganizationTemplate.xml" segmentFile="Organization" domainName="Organization" partitionSegmentSubDir="" /> <templateFile tag="DepartmentTemplate" templateFile="DepartmentTemplate.xml" segmentFile="Department" domainName="Department" partitionSegmentSubDir="" /> <templateFile templateFile="DepartmentsTemplate.xml" tag="DepartmentsTemplate"/> </templateFiles> <segments indentLevel="3"> <segment tag="OrganizationTemplate"> <segment tag="DepartmentsTemplate"> <segment tag="DepartmentTemplate" isList="true"> <segment tag="UsersTemplate"> <segment tag="UserTemplate" isList="true"/> </segment> </segment> </segment> </segment> </segments> </config>
Steps to Create Configuration File
- In the Project Dashboard, select the Project and Project Version.
- Select the Configuration Management tab from the Management pane.
- Click on the New Configuration button.
- Select the XML radio button in the Select Configuration Type dialog window.
- Enter the required parameters to create a configuration file.
- Name: Defines the unique name for the XML configuration.
- Config File Name: Defines the name of the configuration file that XMLSegmentMergeReceiver will read to create an XML format file.
- Segment Indent Level: Defines the indentation for the nested XML output.
- Output File Name Format: Defines the format for the name of the output file.
- Use the Add button to add additional lines and the Delete button to remove a line.
- Choose a format option for each line: Constant, Counter, or Timestamp.
- Template Files: Defines the various segment and template files used to build nested XML.
- Select a template file and the corresponding template (if one applies)
- Only check the checkbox if there will be repeating tags. For example, if each file will have a department with multiple users.
- Arrange the Segments in a hierarchy by performing a drag/drop action.
- Click Done once finished.
Example User Story
In this simple use case, a user wants to generate N number of User records for each Department and N number of Departments for each Organization.
So, the examples given below will be based on the generation of segmented data for four Domains. There are four Domains that represent the following hierarchy in parent-child relationships:
- OrganizationDomain is the root Domain
- DepartmentDomain is a child of the OrganizationDomain
- UserDomain is a child of the DepartmentDomain
- AddressDomain is a child of the UserDomain
Each Domain will use a SegmentCreatorReceiver to generate segmented data output with referential integrity with regard to parent-child relationships. The last Domain, Merge, will use an XMLSegmentMergeReceiver to merge the segmented data generated for each Domain into one or more nested XML output files.
Five Scenarios will be created, out of which Four Scenarios will contain instructions on how much-segmented data to generate for each Domain. The last Scenario will merge the segments together to generate the output. Lastly, the Scenarios can be chained together so that they can be run with one command instead of five separate commands.
Project Setup
This Project, for this example, has five Domains:
Domain Name | Description | Assigned Receiver |
Organization | Generates Organization segment data | SegmentDataCreatorReceiver |
Department | Generates Department segment data | SegmentDataCreatorReceiver |
User | Generates User segment data | SegmentDataCreatorReceiver |
Address | Generates Address segment data | SegmentDataCreatorReceiver |
Merge | Merges generated segment output based on configuration and template files. | XMLSegmentMergeReceiver |
Organization Domain
The Organization Domain generates the organization data segment that will be merged with the other segments to generate nested XML output. It will generate three Organizations, each in its own file.
- loopCount = 3
- Scenario = OrganizationScenario
- Receiver = SegmentDataCreatorReceiver
Receiver Configuration
- fileName = OrganizationSegment.xml
Relationship Information
The Organization Domain is the parent of the Departments Domain.
Template Setup
Department Domain
The Department Domain generates the department data segment that will be merged with the other segments to generate nested XML output. It will generate three departments per organization.
- loopCount = 3
- Scenario = DepartmentScenario
- Receiver = SegmentDataCreatorReceiver
Receiver Configuration
- fileName = DepartmentSegment.xml
Relationship Information
The Department Domain is the parent of the User Domain.
Template Setup
The DepartmentsTemplate creates a departments tag that will encase the generated departments in the XML output file (e.g., <departments> </departments>).
The DepartmentTemplate defines the department segment formatting.
User Domain
The User Domain generates the user data segment that will be merged with the other segments to generate nested XML output. It will generate three users per department.
- loopCount = 3
- Scenario = UserScenario
- Receiver = SegmentDataCreatorReceiver
Receiver Configuration
- fileName = UserSegment.xml
Relationship Information
The User Domain is the parent of the Address Domain.
Template Setup
The UsersTemplate creates a users tag that will encase the generated departments in the XML output file (e.g., <users></users>).
The UserTemplate defines the user segment formatting.
Address Domain
The Address Domain generates the address data segment that will be merged with the other segments to generate nested XML output. It will generate one address per user.
- loopCount = 1
- Scenario = AddressScenario
- Receiver = SegmentDataCreatorReceiver
Receiver Configuration
- fileName = AddressSegment.xml
Relationship Information
The Address Domain is a child of the User Domain.
Template Setup
Merge Domain
The MergeDomain uses the XMLSegmentMergeReceiver to merge the generated segments based on the configuration and template files.
- loopCount = 1
- Scenario = MergeScenario
- Receiver = XMLSegmentMergeReceiver
XMLSegmentMergeReceiver Configuration
Scenario Chain
A Scenario Chain is necessary to run the Scenarios in the proper sequence and generate the nested XML output. For more information on creating a Scenario Chain, click here.
Note: The MergeScenario should always be last in the chain.
Configuration File
This is an example configuration file that is defined to allow four segment files to be merged into one or more XML nested output files. The format of the segmented data must produce nested output which meets the following rules:
- Three organizations must be generated, each to its own nested XML file.
- Each organization must have three departments
- Each department must have three users
- Each user must have one address
Setup in GenRocket Web Platform
The XML configuration file
Below is the configuration file that will be used for this example:
<config> <fileNameSegment segmentType="Constant" value="Order-"/> <fileNameSegment segmentType="TimeStamp" value="yyyyMMddHHmmss"/> <fileNameSegment segmentType="Constant" value="-"/> <fileNameSegment segmentType="Counter" value="1"/> <fileNameSegment segmentType="Constant" value=".xml"/> </fileNameSegments> <templateFiles> <templateFile tag="organization" templateFile="OrganizationTemplate.xml" segmentFile="OrganizationSegment.xml"/> <templateFile tag="departments" templateFile="DepartmentsTemplate.xml"/> <templateFile tag="department" templateFile="DepartmentTemplate.xml" segmentFile="DepartmentSegment.xml" /> <templateFile tag="users" templateFile="UsersTemplate.xml"/> <templateFile tag="user" templateFile="UserTemplate.xml" segmentFile="UserSegment.xml"/> <templateFile tag="address" templateFile="AddressTemplate.xml" segmentFile="AddressSegment.xml"/> </templateFiles> <segments indentLevel="4"> <segment tag="organization"> <segment tag="departments"> <segment tag="department" isList="true"> <segment tag="users"> <segment tag="user" isList="true"> <segment tag="address"/> </segment> </segment> </segment> </segment> </segment> </segments> </config>
The example configuration file defines the following information.
FileNameSegments
The subelements will produce a file naming convention that looks like the following:
- Order-20170316171247-1.xml
- Order-20170316171259-2.xml
- Order-20170316171259-3.xml
TemplateFiles
The following template files will be loaded and used to create the XML output when merged with segment data.
- OrganizationTemplate.xml
- DepartmentsTemplate.xml
- DepartmentTemplate.xml
- UsersTemplate.xml
- UserTemplate.xml
- AddressTemplate.xml
SegmentFiles
The following segment files will be loaded, and their data will be used in the merge process.
OrganizationSegment.xml
DepartmentSegment.xml
UserSegment.xml
AddressSegment.xml
Segments
The nested segments determine the sequence and structure of the nested XML output.
<organization> <departments> <department> <users> <user> <address>
Template Files
Each template file below represents a block of XML elements used for merging with segment data that, combined together, will create a nested XML file.
Organization Template
This template will be used for data segment merging with <segment name="organization">
<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>
Departments Template
This template will be used for data segment merging with <segment name="departments">
<template> <header> <line><![CDATA[<departments>]]></line> </header> <body/> <footer> <line><![CDATA[</departments>]]></line> </footer> </template>
Department Template
This template will be used for data segment merging with <segment name="department" innerHeader="true">
<template> <header> <line><![CDATA[<department id="@id@">]]></line> </header> <body> <line><![CDATA[<name>@name@</name> ]]></line> <line><![CDATA[<emailAddress>@emailAddress@</emailAddress>]]></line> </body> <footer> <line><![CDATA[</department>]]></line> </footer> </template>
Users Template
This template will be used for data segment merging with <segment name="users">
<template> <header> <line><![CDATA[<users>]]></line> </header> <body/> <footer> <line><![CDATA[</users>]]></line> </footer> </template>
User Template
This template will be used for data segment merging with <segment name="user" innerHeader="true">
<template> <header> <line><![CDATA[<user id="@id@">]]></line> </header> <body> <line><![CDATA[<firstName>@firstName@</firstName>]]></line> <line><![CDATA[<lastName>@lastName@</lastName>]]></line> <line><![CDATA[<middleInitial>@middleInitial@</middleInitial>]]></line> <line><![CDATA[<password>@password@</password>]]></line> <line><![CDATA[<emailAddress>@emailAddress@</emailAddress>]]></line> </body> <footer> <line><![CDATA[</user>]]></line> </footer> </template>
Address Template
This template will be used for data segment merging with <segment name="address">
<template> <header> <line><![CDATA[<address id="@id@" address="@address@">]]></line> </header> <body> <line><![CDATA[<city>@city@</city>]]></line> <line><![CDATA[<state>@state@</state>]]></line> <line><![CDATA[<zipCode>@zipCode@</zipCode>]]></line> </body> <footer> <line><![CDATA[</address>]]></line> </footer> </template>
Example Output Files
All of the example files below were generated by GenRocket.
Example merged nested XML file
The following is an example of a merged XML file for the first organization generated.
<?xml version="1.0" encoding="UTF-8"?> <organization id="1"> <name>Organization 1</name> <address>1000 N Washington Dr</address> <city>Des Moines</city> <state>IA</state> <zipCode>50301</zipCode> <webAddress>www.org1.com</webAddress> <departments> <name>Department 1</name> <emailAddress>zelma.lao@gmail.com</emailAddress> <user id="1"> <firstName>Shawn</firstName> <lastName>Vogt</lastName> <middleInitial>T</middleInitial> <password>356a192b7913b04c54574d18c28d46e6395428ab</password> <emailAddress>user1@email.com</emailAddress> <address id="1" address="1000 N Washington Dr"> <city>Oklahoma City</city> <state>OK</state> <zipCode>73101</zipCode> </address> </user> <user id="2"> <firstName>Risa</firstName> <lastName>Serrato</lastName> <middleInitial>M</middleInitial> <password>da4b9237bacccdf19c0760cab7aec4a8359010b0</password> <emailAddress>user2@email.com</emailAddress> <address id="2" address="1001 S Adams Sq"> <city>Bismarck</city> <state>ND</state> <zipCode>58501</zipCode> </address> </user> <user id="3"> <firstName>Matilda</firstName> <lastName>Layne</lastName> <middleInitial>K</middleInitial> <password>77de68daecd823babbb58edb1c8e14d7106e83bb</password> <emailAddress>user3@email.com</emailAddress> <address id="3" address="1002 E Jefferson Ct"> <city>Little Rock</city> <state>AR</state> <zipCode>72201</zipCode> </address> </user> </departments> <departments> <name>Department 2</name> <emailAddress>elisha.cardinal@yahoo.com</emailAddress> <user id="4"> <firstName>Naomi</firstName> <lastName>Mcmahan</lastName> <middleInitial>L</middleInitial> <password>1b6453892473a467d07372d45eb05abc2031647a</password> <emailAddress>user4@email.com</emailAddress> <address id="4" address="1003 W Madison St"> <city>Helena</city> <state>MT</state> <zipCode>59601</zipCode> </address> </user> <user id="5"> <firstName>Drema</firstName> <lastName>Kraemer</lastName> <middleInitial>M</middleInitial> <password>ac3478d69a3c81fa62e60f5c3696165a4e5e6ac4</password> <emailAddress>user5@email.com</emailAddress> <address id="5" address="1004 NS Monroe Rd"> <city>Baton Rouge</city> <state>LA</state> <zipCode>70801</zipCode> </address> </user> <user id="6"> <firstName>Pia</firstName> <lastName>Ardoin</lastName> <middleInitial>L</middleInitial> <password>c1dfd96eea8cc2b62785275bca38ac261256e278</password> <emailAddress>user6@email.com</emailAddress> <address id="6" address="1005 NE Adams Ave"> <city>Albany</city> <state>NY</state> <zipCode>12201</zipCode> </address> </user> </departments> <departments> <name>Department 3</name> <emailAddress>oliver.mark@yahoo.com</emailAddress> <user id="7"> <firstName>Patsy</firstName> <lastName>Hockett</lastName> <middleInitial>B</middleInitial> <password>902ba3cda1883801594b6e1b452790cc53948fda</password> <emailAddress>user7@email.com</emailAddress> <address id="7" address="1006 NW Jackson Blvd"> <city>Lincoln</city> <state>NE</state> <zipCode>68501</zipCode> </address> </user> <user id="8"> <firstName>Anita</firstName> <lastName>Boss</lastName> <middleInitial>I</middleInitial> <password>fe5dbbcea5ce7e2988b8c69bcfdfde8904aabc1f</password> <emailAddress>user8@email.com</emailAddress> <address id="8" address="1007 SE Van Buren Wy"> <city>Trenton</city> <state>NJ</state> <zipCode>08601</zipCode> </address> </user> <user id="9"> <firstName>Belen</firstName> <lastName>Moriarty</lastName> <middleInitial>H</middleInitial> <password>0ade7c2cf97f75d009975f4d720d1fa6c19f4897</password> <emailAddress>user9@email.com</emailAddress> <address id="9" address="1008 SW Harrison Ln"> <city>Lansing</city> <state>MI</state> <zipCode>48901</zipCode> </address> </user> </departments> </organization>
Example Segment Files
The following are four example segmented data files used to generate the merged nested JSON files.
OrganizationSegment.xml
This file will contain three segments, each having one data element containing the organization attributes, a loopCount equal to one, and no parentId since the organization is the root Domain and does not have a parent Domain.
<segments> <segment loopCount="1"> <data> <attribute name="id">1</attribute> <attribute name="name">Organization 1</attribute> <attribute name="address">1000 N Washington Dr</attribute> <attribute name="city">Des Moines</attribute> <attribute name="state">IA</attribute> <attribute name="zipCode">50301</attribute> <attribute name="webAddress">www.org1.com</attribute> </data> </segment> <segment loopCount="1"> <data> <attribute name="id">2</attribute> <attribute name="name">Organization 2</attribute> <attribute name="address">1001 S Adams Sq</attribute> <attribute name="city">Augusta</attribute> <attribute name="state">ME</attribute> <attribute name="zipCode">04330</attribute> <attribute name="webAddress">www.org2.com</attribute> </data> </segment> <segment loopCount="1"> <data> <attribute name="id">3</attribute> <attribute name="name">Organization 3</attribute> <attribute name="address">1002 E Jefferson Ct</attribute> <attribute name="city">Raleigh</attribute> <attribute name="state">NC</attribute> <attribute name="zipCode">27601</attribute> <attribute name="webAddress">www.org3.com</attribute> </data> </segment> </segments>
DepartmentSegment.xml
This file will contain three segments, each having three data elements containing the department attributes, a loopCount equal to three, and a parentId given each set of departments referential integrity to an organization defined within OrganizationSegment.xml.
<segments> <segment parentId="1" loopCount="3"> <data> <attribute name="id">1</attribute> <attribute name="name">Department 1</attribute> <attribute name="manager">Zelma Q. Lao</attribute> <attribute name="emailAddress">zelma.lao@gmail.com</attribute> <attribute name="organization">1</attribute> </data> <data> <attribute name="id">2</attribute> <attribute name="name">Department 2</attribute> <attribute name="manager">Elisha Z. Cardinal</attribute> <attribute name="emailAddress">elisha.cardinal@yahoo.com</attribute> <attribute name="organization">1</attribute> </data> <data> <attribute name="id">3</attribute> <attribute name="name">Department 3</attribute> <attribute name="manager">Oliver G. Mark</attribute> <attribute name="emailAddress">oliver.mark@yahoo.com</attribute> <attribute name="organization">1</attribute> </data> </segment> <segment parentId="2" loopCount="3"> <data> <attribute name="id">4</attribute> <attribute name="name">Department 1</attribute> <attribute name="manager">Piedad I. Liggett</attribute> <attribute name="emailAddress">piedad.liggett@gmail.com</attribute> <attribute name="organization">2</attribute> </data> <data> <attribute name="id">5</attribute> <attribute name="name">Department 2</attribute> <attribute name="manager">Beatrice L. Lafferty</attribute> <attribute name="emailAddress">beatrice.lafferty@yahoo.com</attribute> <attribute name="organization">2</attribute> </data> <data> <attribute name="id">6</attribute> <attribute name="name">Department 3</attribute> <attribute name="manager">Alva X. Vanmeter</attribute> <attribute name="emailAddress">alva.vanmeter@gmail.com</attribute> <attribute name="organization">2</attribute> </data> </segment> <segment parentId="3" loopCount="3"> <data> <attribute name="id">7</attribute> <attribute name="name">Department 1</attribute> <attribute name="manager">Rodger T. Catania</attribute> <attribute name="emailAddress">rodger.catania@yahoo.com</attribute> <attribute name="organization">3</attribute> </data> <data> <attribute name="id">8</attribute> <attribute name="name">Department 2</attribute> <attribute name="manager">Lara V. Groce</attribute> <attribute name="emailAddress">lara.groce@email.com</attribute> <attribute name="organization">3</attribute> </data> <data> <attribute name="id">9</attribute> <attribute name="name">Department 3</attribute> <attribute name="manager">Roosevelt V. Hudgens</attribute> <attribute name="emailAddress">roosevelt.hudgens@gmail.com</attribute> <attribute name="organization">3</attribute> </data> </segment> </segments>
UserSegment.xml
This file will contain nine segments, each having three data elements containing the user attributes, a loopCount equal to three, and a parentId given each set of users referential integrity to a given department defined within DepartmentSegment.xml.
<segments> <segment parentId="1" loopCount="3"> <data> <attribute name="id">1</attribute> <attribute name="firstName">Shawn</attribute> <attribute name="lastName">Vogt</attribute> <attribute name="middleInitial">T</attribute> <attribute name="password">356a192b7913b04c54574d18c28d46e6395428ab</attribute> <attribute name="emailAddress">user1@email.com</attribute> <attribute name="phoneNumber">(427) 432-5399</attribute> <attribute name="department">1</attribute> </data> <data> <attribute name="id">2</attribute> <attribute name="firstName">Risa</attribute> <attribute name="lastName">Serrato</attribute> <attribute name="middleInitial">M</attribute> <attribute name="password">da4b9237bacccdf19c0760cab7aec4a8359010b0</attribute> <attribute name="emailAddress">user2@email.com</attribute> <attribute name="phoneNumber">(344) 216-4441</attribute> <attribute name="department">1</attribute> </data> <data> <attribute name="id">3</attribute> <attribute name="firstName">Matilda</attribute> <attribute name="lastName">Layne</attribute> <attribute name="middleInitial">K</attribute> <attribute name="password">77de68daecd823babbb58edb1c8e14d7106e83bb</attribute> <attribute name="emailAddress">user3@email.com</attribute> <attribute name="phoneNumber">(448) 155-4403</attribute> <attribute name="department">1</attribute> </data> </segment> <segment parentId="2" loopCount="3"> <data> <attribute name="id">4</attribute> <attribute name="firstName">Naomi</attribute> <attribute name="lastName">Mcmahan</attribute> <attribute name="middleInitial">L</attribute> <attribute name="password">1b6453892473a467d07372d45eb05abc2031647a</attribute> <attribute name="emailAddress">user4@email.com</attribute> <attribute name="phoneNumber">(781) 135-6178</attribute> <attribute name="department">2</attribute> </data> <data> <attribute name="id">5</attribute> <attribute name="firstName">Drema</attribute> <attribute name="lastName">Kraemer</attribute> <attribute name="middleInitial">M</attribute> <attribute name="password">ac3478d69a3c81fa62e60f5c3696165a4e5e6ac4</attribute> <attribute name="emailAddress">user5@email.com</attribute> <attribute name="phoneNumber">(514) 331-8338</attribute> <attribute name="department">2</attribute> </data> <data> <attribute name="id">6</attribute> <attribute name="firstName">Pia</attribute> <attribute name="lastName">Ardoin</attribute> <attribute name="middleInitial">L</attribute> <attribute name="password">c1dfd96eea8cc2b62785275bca38ac261256e278</attribute> <attribute name="emailAddress">user6@email.com</attribute> <attribute name="phoneNumber">(704) 723-8651</attribute> <attribute name="department">2</attribute> </data> </segment> <segment parentId="3" loopCount="3"> <data> <attribute name="id">7</attribute> <attribute name="firstName">Patsy</attribute> <attribute name="lastName">Hockett</attribute> <attribute name="middleInitial">B</attribute> <attribute name="password">902ba3cda1883801594b6e1b452790cc53948fda</attribute> <attribute name="emailAddress">user7@email.com</attribute> <attribute name="phoneNumber">(585) 403-7634</attribute> <attribute name="department">3</attribute> </data> <data> <attribute name="id">8</attribute> <attribute name="firstName">Anita</attribute> <attribute name="lastName">Boss</attribute> <attribute name="middleInitial">I</attribute> <attribute name="password">fe5dbbcea5ce7e2988b8c69bcfdfde8904aabc1f</attribute> <attribute name="emailAddress">user8@email.com</attribute> <attribute name="phoneNumber">(661) 350-2003</attribute> <attribute name="department">3</attribute> </data> <data> <attribute name="id">9</attribute> <attribute name="firstName">Belen</attribute> <attribute name="lastName">Moriarty</attribute> <attribute name="middleInitial">H</attribute> <attribute name="password">0ade7c2cf97f75d009975f4d720d1fa6c19f4897</attribute> <attribute name="emailAddress">user9@email.com</attribute> <attribute name="phoneNumber">(280) 129-7045</attribute> <attribute name="department">3</attribute> </data> </segment> <segment parentId="4" loopCount="3"> <data> <attribute name="id">10</attribute> <attribute name="firstName">Virgina</attribute> <attribute name="lastName">Capobianco</attribute> <attribute name="middleInitial">B</attribute> <attribute name="password">b1d5781111d84f7b3fe45a0852e59758cd7a87e5</attribute> <attribute name="emailAddress">user10@email.com</attribute> <attribute name="phoneNumber">(274) 774-3163</attribute> <attribute name="department">4</attribute> </data> <data> <attribute name="id">11</attribute> <attribute name="firstName">Kimbery</attribute> <attribute name="lastName">Toombs</attribute> <attribute name="middleInitial">N</attribute> <attribute name="password">17ba0791499db908433b80f37c5fbc89b870084b</attribute> <attribute name="emailAddress">user11@email.com</attribute> <attribute name="phoneNumber">(734) 339-1216</attribute> <attribute name="department">4</attribute> </data> <data> <attribute name="id">12</attribute> <attribute name="firstName">Marilou</attribute> <attribute name="lastName">Loudermilk</attribute> <attribute name="middleInitial">A</attribute> <attribute name="password">7b52009b64fd0a2a49e6d8a939753077792b0554</attribute> <attribute name="emailAddress">user12@email.com</attribute> <attribute name="phoneNumber">(334) 750-2942</attribute> <attribute name="department">4</attribute> </data> </segment> <segment parentId="5" loopCount="3"> <data> <attribute name="id">13</attribute> <attribute name="firstName">Mandi</attribute> <attribute name="lastName">Mancini</attribute> <attribute name="middleInitial">E</attribute> <attribute name="password">bd307a3ec329e10a2cff8fb87480823da114f8f4</attribute> <attribute name="emailAddress">user13@email.com</attribute> <attribute name="phoneNumber">(450) 311-6702</attribute> <attribute name="department">5</attribute> </data> <data> <attribute name="id">14</attribute> <attribute name="firstName">Joyce</attribute> <attribute name="lastName">Stenger</attribute> <attribute name="middleInitial">B</attribute> <attribute name="password">fa35e192121eabf3dabf9f5ea6abdbcbc107ac3b</attribute> <attribute name="emailAddress">user14@email.com</attribute> <attribute name="phoneNumber">(631) 482-4459</attribute> <attribute name="department">5</attribute> </data> <data> <attribute name="id">15</attribute> <attribute name="firstName">Griselda</attribute> <attribute name="lastName">Honeycutt</attribute> <attribute name="middleInitial">F</attribute> <attribute name="password">f1abd670358e036c31296e66b3b66c382ac00812</attribute> <attribute name="emailAddress">user15@email.com</attribute> <attribute name="phoneNumber">(527) 520-3672</attribute> <attribute name="department">5</attribute> </data> </segment> <segment parentId="6" loopCount="3"> <data> <attribute name="id">16</attribute> <attribute name="firstName">Rhonda</attribute> <attribute name="lastName">Steadman</attribute> <attribute name="middleInitial">U</attribute> <attribute name="password">1574bddb75c78a6fd2251d61e2993b5146201319</attribute> <attribute name="emailAddress">user16@email.com</attribute> <attribute name="phoneNumber">(497) 579-4807</attribute> <attribute name="department">6</attribute> </data> <data> <attribute name="id">17</attribute> <attribute name="firstName">Roseann</attribute> <attribute name="lastName">Haire</attribute> <attribute name="middleInitial">I</attribute> <attribute name="password">0716d9708d321ffb6a00818614779e779925365c</attribute> <attribute name="emailAddress">user17@email.com</attribute> <attribute name="phoneNumber">(228) 558-2751</attribute> <attribute name="department">6</attribute> </data> <data> <attribute name="id">18</attribute> <attribute name="firstName">Shari</attribute> <attribute name="lastName">Latour</attribute> <attribute name="middleInitial">M</attribute> <attribute name="password">9e6a55b6b4563e652a23be9d623ca5055c356940</attribute> <attribute name="emailAddress">user18@email.com</attribute> <attribute name="phoneNumber">(567) 161-7718</attribute> <attribute name="department">6</attribute> </data> </segment> <segment parentId="7" loopCount="3"> <data> <attribute name="id">19</attribute> <attribute name="firstName">Zenaida</attribute> <attribute name="lastName">Mayorga</attribute> <attribute name="middleInitial">F</attribute> <attribute name="password">b3f0c7f6bb763af1be91d9e74eabfeb199dc1f1f</attribute> <attribute name="emailAddress">user19@email.com</attribute> <attribute name="phoneNumber">(279) 770-7473</attribute> <attribute name="department">7</attribute> </data> <data> <attribute name="id">20</attribute> <attribute name="firstName">Jasmin</attribute> <attribute name="lastName">Chavez</attribute> <attribute name="middleInitial">M</attribute> <attribute name="password">91032ad7bbcb6cf72875e8e8207dcfba80173f7c</attribute> <attribute name="emailAddress">user20@email.com</attribute> <attribute name="phoneNumber">(754) 327-7942</attribute> <attribute name="department">7</attribute> </data> <data> <attribute name="id">21</attribute> <attribute name="firstName">Sanjuana</attribute> <attribute name="lastName">Curiel</attribute> <attribute name="middleInitial">V</attribute> <attribute name="password">472b07b9fcf2c2451e8781e944bf5f77cd8457c8</attribute> <attribute name="emailAddress">user21@email.com</attribute> <attribute name="phoneNumber">(591) 253-4838</attribute> <attribute name="department">7</attribute> </data> </segment> <segment parentId="8" loopCount="3"> <data> <attribute name="id">22</attribute> <attribute name="firstName">Kasie</attribute> <attribute name="lastName">Doucette</attribute> <attribute name="middleInitial">Q</attribute> <attribute name="password">12c6fc06c99a462375eeb3f43dfd832b08ca9e17</attribute> <attribute name="emailAddress">user22@email.com</attribute> <attribute name="phoneNumber">(723) 134-4704</attribute> <attribute name="department">8</attribute> </data> <data> <attribute name="id">23</attribute> <attribute name="firstName">Janette</attribute> <attribute name="lastName">Gerken</attribute> <attribute name="middleInitial">U</attribute> <attribute name="password">d435a6cdd786300dff204ee7c2ef942d3e9034e2</attribute> <attribute name="emailAddress">user23@email.com</attribute> <attribute name="phoneNumber">(756) 195-7153</attribute> <attribute name="department">8</attribute> </data> <data> <attribute name="id">24</attribute> <attribute name="firstName">Ilene</attribute> <attribute name="lastName">Durkin</attribute> <attribute name="middleInitial">W</attribute> <attribute name="password">4d134bc072212ace2df385dae143139da74ec0ef</attribute> <attribute name="emailAddress">user24@email.com</attribute> <attribute name="phoneNumber">(401) 554-6482</attribute> <attribute name="department">8</attribute> </data> </segment> <segment parentId="9" loopCount="3"> <data> <attribute name="id">25</attribute> <attribute name="firstName">Willa</attribute> <attribute name="lastName">Byars</attribute> <attribute name="middleInitial">K</attribute> <attribute name="password">f6e1126cedebf23e1463aee73f9df08783640400</attribute> <attribute name="emailAddress">user25@email.com</attribute> <attribute name="phoneNumber">(498) 302-5181</attribute> <attribute name="department">9</attribute> </data> <data> <attribute name="id">26</attribute> <attribute name="firstName">Ivana</attribute> <attribute name="lastName">Derby</attribute> <attribute name="middleInitial">D</attribute> <attribute name="password">887309d048beef83ad3eabf2a79a64a389ab1c9f</attribute> <attribute name="emailAddress">user26@email.com</attribute> <attribute name="phoneNumber">(346) 437-9298</attribute> <attribute name="department">9</attribute> </data> <data> <attribute name="id">27</attribute> <attribute name="firstName">Marlo</attribute> <attribute name="lastName">Hazelwood</attribute> <attribute name="middleInitial">A</attribute> <attribute name="password">bc33ea4e26e5e1af1408321416956113a4658763</attribute> <attribute name="emailAddress">user27@email.com</attribute> <attribute name="phoneNumber">(592) 394-1746</attribute> <attribute name="department">9</attribute> </data> </segment> </segments>
AddressSegment.xml
This file will contain twenty-seven segments, each having one data element containing address attributes, a loopCount equal to 1, and a parentId given each address referential integrity to a given user, defined within UserSegment.xml.
<segments> <segment parentId="1" loopCount="1"> <data> <attribute name="id">1</attribute> <attribute name="address">1000 N Washington Dr</attribute> <attribute name="city">Oklahoma City</attribute> <attribute name="state">OK</attribute> <attribute name="zipCode">73101</attribute> <attribute name="user">1</attribute> </data> </segment> <segment parentId="2" loopCount="1"> <data> <attribute name="id">2</attribute> <attribute name="address">1001 S Adams Sq</attribute> <attribute name="city">Bismarck</attribute> <attribute name="state">ND</attribute> <attribute name="zipCode">58501</attribute> <attribute name="user">2</attribute> </data> </segment> <segment parentId="3" loopCount="1"> <data> <attribute name="id">3</attribute> <attribute name="address">1002 E Jefferson Ct</attribute> <attribute name="city">Little Rock</attribute> <attribute name="state">AR</attribute> <attribute name="zipCode">72201</attribute> <attribute name="user">3</attribute> </data> </segment> <segment parentId="4" loopCount="1"> <data> <attribute name="id">4</attribute> <attribute name="address">1003 W Madison St</attribute> <attribute name="city">Helena</attribute> <attribute name="state">MT</attribute> <attribute name="zipCode">59601</attribute> <attribute name="user">4</attribute> </data> </segment> <segment parentId="5" loopCount="1"> <data> <attribute name="id">5</attribute> <attribute name="address">1004 NS Monroe Rd</attribute> <attribute name="city">Baton Rouge</attribute> <attribute name="state">LA</attribute> <attribute name="zipCode">70801</attribute> <attribute name="user">5</attribute> </data> </segment> <segment parentId="6" loopCount="1"> <data> <attribute name="id">6</attribute> <attribute name="address">1005 NE Adams Ave</attribute> <attribute name="city">Albany</attribute> <attribute name="state">NY</attribute> <attribute name="zipCode">12201</attribute> <attribute name="user">6</attribute> </data> </segment> <segment parentId="7" loopCount="1"> <data> <attribute name="id">7</attribute> <attribute name="address">1006 NW Jackson Blvd</attribute> <attribute name="city">Lincoln</attribute> <attribute name="state">NE</attribute> <attribute name="zipCode">68501</attribute> <attribute name="user">7</attribute> </data> </segment> <segment parentId="8" loopCount="1"> <data> <attribute name="id">8</attribute> <attribute name="address">1007 SE Van Buren Wy</attribute> <attribute name="city">Trenton</attribute> <attribute name="state">NJ</attribute> <attribute name="zipCode">08601</attribute> <attribute name="user">8</attribute> </data> </segment> <segment parentId="9" loopCount="1"> <data> <attribute name="id">9</attribute> <attribute name="address">1008 SW Harrison Ln</attribute> <attribute name="city">Lansing</attribute> <attribute name="state">MI</attribute> <attribute name="zipCode">48901</attribute> <attribute name="user">9</attribute> </data> </segment> <segment parentId="10" loopCount="1"> <data> <attribute name="id">10</attribute> <attribute name="address">1009 EW Tyler Cir</attribute> <attribute name="city">Annapolis</attribute> <attribute name="state">MD</attribute> <attribute name="zipCode">21401</attribute> <attribute name="user">10</attribute> </data> </segment> <segment parentId="11" loopCount="1"> <data> <attribute name="id">11</attribute> <attribute name="address">1010 N Polk Pk</attribute> <attribute name="city">Atlanta</attribute> <attribute name="state">GA</attribute> <attribute name="zipCode">30301</attribute> <attribute name="user">11</attribute> </data> </segment> <segment parentId="12" loopCount="1"> <data> <attribute name="id">12</attribute> <attribute name="address">1011 S Taylor Pkwy</attribute> <attribute name="city">Helena</attribute> <attribute name="state">MT</attribute> <attribute name="zipCode">59601</attribute> <attribute name="user">12</attribute> </data> </segment> <segment parentId="13" loopCount="1"> <data> <attribute name="id">13</attribute> <attribute name="address">1012 E Fillmore Dr</attribute> <attribute name="city">Madison</attribute> <attribute name="state">WI</attribute> <attribute name="zipCode">53562</attribute> <attribute name="user">13</attribute> </data> </segment> <segment parentId="14" loopCount="1"> <data> <attribute name="id">14</attribute> <attribute name="address">1013 W Pierce Sq</attribute> <attribute name="city">Boston</attribute> <attribute name="state">MA</attribute> <attribute name="zipCode">02108</attribute> <attribute name="user">14</attribute> </data> </segment> <segment parentId="15" loopCount="1"> <data> <attribute name="id">15</attribute> <attribute name="address">1014 NS Buchanan Ct</attribute> <attribute name="city">Trenton</attribute> <attribute name="state">NJ</attribute> <attribute name="zipCode">08601</attribute> <attribute name="user">15</attribute> </data> </segment> <segment parentId="16" loopCount="1"> <data> <attribute name="id">16</attribute> <attribute name="address">1015 NE Lincoln St</attribute> <attribute name="city">Bismarck</attribute> <attribute name="state">ND</attribute> <attribute name="zipCode">58501</attribute> <attribute name="user">16</attribute> </data> </segment> <segment parentId="17" loopCount="1"> <data> <attribute name="id">17</attribute> <attribute name="address">1016 NW Johnson Rd</attribute> <attribute name="city">Jackson</attribute> <attribute name="state">MS</attribute> <attribute name="zipCode">39201</attribute> <attribute name="user">17</attribute> </data> </segment> <segment parentId="18" loopCount="1"> <data> <attribute name="id">18</attribute> <attribute name="address">1017 SE Grant Ave</attribute> <attribute name="city">Jackson</attribute> <attribute name="state">MS</attribute> <attribute name="zipCode">39201</attribute> <attribute name="user">18</attribute> </data> </segment> <segment parentId="19" loopCount="1"> <data> <attribute name="id">19</attribute> <attribute name="address">1018 SW Hayes Blvd</attribute> <attribute name="city">Olympia</attribute> <attribute name="state">WA</attribute> <attribute name="zipCode">98501</attribute> <attribute name="user">19</attribute> </data> </segment> <segment parentId="20" loopCount="1"> <data> <attribute name="id">20</attribute> <attribute name="address">1019 EW Garfield Wy</attribute> <attribute name="city">Baton Rouge</attribute> <attribute name="state">LA</attribute> <attribute name="zipCode">70801</attribute> <attribute name="user">20</attribute> </data> </segment> <segment parentId="21" loopCount="1"> <data> <attribute name="id">21</attribute> <attribute name="address">1020 N Arthur Ln</attribute> <attribute name="city">Columbia</attribute> <attribute name="state">SC</attribute> <attribute name="zipCode">29201</attribute> <attribute name="user">21</attribute> </data> </segment> <segment parentId="22" loopCount="1"> <data> <attribute name="id">22</attribute> <attribute name="address">1021 S Cleveland Cir</attribute> <attribute name="city">Helena</attribute> <attribute name="state">MT</attribute> <attribute name="zipCode">59601</attribute> <attribute name="user">22</attribute> </data> </segment> <segment parentId="23" loopCount="1"> <data> <attribute name="id">23</attribute> <attribute name="address">1022 E Harrison Pk</attribute> <attribute name="city">Saint Paul</attribute> <attribute name="state">MN</attribute> <attribute name="zipCode">55101</attribute> <attribute name="user">23</attribute> </data> </segment> <segment parentId="24" loopCount="1"> <data> <attribute name="id">24</attribute> <attribute name="address">1023 W Cleveland Pkwy</attribute> <attribute name="city">Santa Fe</attribute> <attribute name="state">NM</attribute> <attribute name="zipCode">87501</attribute> <attribute name="user">24</attribute> </data> </segment> <segment parentId="25" loopCount="1"> <data> <attribute name="id">25</attribute> <attribute name="address">1024 NS McKinley Dr</attribute> <attribute name="city">Richmond</attribute> <attribute name="state">VA</attribute> <attribute name="zipCode">22109</attribute> <attribute name="user">25</attribute> </data> </segment> <segment parentId="26" loopCount="1"> <data> <attribute name="id">26</attribute> <attribute name="address">1025 NE T. Roosevelt Sq</attribute> <attribute name="city">Carson City</attribute> <attribute name="state">NV</attribute> <attribute name="zipCode">89701</attribute> <attribute name="user">26</attribute> </data> </segment> <segment parentId="27" loopCount="1"> <data> <attribute name="id">27</attribute> <attribute name="address">1026 NW Taft Ct</attribute> <attribute name="city">Pierre</attribute> <attribute name="state">SD</attribute> <attribute name="zipCode">57501</attribute> <attribute name="user">27</attribute> </data> </segment> </segments>