Incoming Payroll XML Document

<payroll type="raw" version="1.0" date="" period="" genSysId="">
    <person id="" name="" marital="single">
        <country name="" gross="" allow="" withHold="" grossYTD="" federalYTD="" method="">
            <state name="" gross="" allow="" withHold="" method="">
                <local name="" gross="" allow="" withHold="" method=""/>
            </state>
            <mileage>value</mileage>
            <adjustment name="" value="" comment=""/>
        </country>
    </person>
</payroll>

specify a <location> for each country, state, local combination that applies to the person's payroll entry.
local does not have to be defined.

state does not have to be defined.

mileage does not have to be defined, but can only be defined once.

adjustment does not have to be defined, but can be defined more than once.

Ex.

<payroll type="raw" version="1.0" date="20020415" period="semimonthly" genSysId="12345">
    <person id="123456789" name="John Doe" marital="single">
        <country name="US" gross="1000.00" allow="1" withHold="1.00" grossYTD="3000.00" federalYTD="100.00" method="">
            <state name="MO" gross="400.00" allow="0" withHold="5.00" method="">
                <local name="St. Louis" gross="0.00" allow="0" withHold="1.00" method=""/>
            </state>
            <state name="IL" gross="600.00" allow="0" withHold="5.00" method="">
                <local name="E. St. Louis" gross="10.00" allow="1" withHold="0.00" method=""/>
            </state>
            <mileage>30</mileage>
        </country>
        <adjustment name="Reimbursement" value="5.25" comment="Sharpees"/>
        <adjustment name="Correction" value="-15.75" comment="Overpay for 20020915"/>
    </person>
</payroll>

Perl data structure:

data = { version, date, persons, period, genSysId }
where persons =  array of persons.
genSysId is an identifier that the generating system associated with this payroll.

In each person, { id, name, countries, marital, adjustments }
where countries = array of country entries.
where adjustments = array of adjustment entries.

In each country , {name,  states,  gross, allow, withHold, grossYTD, federalYTD, method, mileage }
In each state , {name,  locals,  gross, allow, withHold, method}

In each local, { name, gross, allow, withHold, method }

In each adjustment, { name, value, comment }
The comment does not have to have a value and will only be output if a value is specified.