Description

The XMLSegmentMergeReceiver merges from two or more segmented data files, generated from the SegmentDataCreatorReceiver, into one or more nested XML formatted files. The format of the XML output is determined from reading a configuration file and one or more XML templates referenced from within the configuration file.  


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 to be stored.
  • configSubDir - Defines the subdirectory under the configPath directory where the configuration file 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.


Configuration File

The configuration file defines the following elements of information:

  1. fileNameSegments - contains subelements that define how file names are created for each nested XML generated. 

  2. templateFiles - contains subelements that define the template file to read and an optional segment to read for the merge process.

  3. segments - contains nested segments that define the nesting of the templates that will define the XML output.


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 regards 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 be containing the instruction on how much-segmented data to generate for each Domain and 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.




Steps to Create Configuration File

  • Select the Configuration Management tab from the Management pane.

  • Click on the New Configuration button.

  • Select XML radio button in the Select Configuration Type.

  • 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 a 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.
    • Template Files: Defines the various segment and template files that will be used to build nested XML.

  • Arrange the Segments in a hierarchy by drag/drop the segments.


Example Configuration File

This is an example configuration file 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:

  • There must be three organizations generated and 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   


The XML configuration file

In order to generate multiple organizations in a separate file, the multiFile parameter is set to true; otherwise, only one nested XML file would be generated containing all organizations, which would not be a well-formed XML file.


<config>
    <fileNameSegments multiFile="true">
        <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 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 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>