Question


How are locations handled for offenses in XML submissions?


In the legacy NIBRS text format, each offense was associated with its own location, even when multiple offenses had the same location type. Can XML files also define a location for each offense?


Answer


Locations are associated with individual offenses.


First, you create an <Offense> tag for each distinct offense code within the incident. Next, you create a <Location> tag for each location type within the incident.  Towards the bottom of the <Report> section you need to associate locations with offenses (up to 2 location types per offense).  


The location type code is separated from the offense to allow a single location type to be shared across multiple offenses. In the burglary example that is included with the IEPD, all three offenses took place in the same location. As a result, you only need to put the location type into the XML file once, but then associate each offense to it.

 
It is not required to share a single location type across multiple offenses. XML containing three distinct <location> tags, all with the same type, and then associated to each offense separately is also allowed. 

This means that a valid XML file can contain the following:

 

<Offense1> ... </Offense1>
<Offense2> ... </Offense2>
<Offense3> ... </Offense3>
<Location1> ... </Location1>
<Location2> ... </Location2>
<Location3> ... </Location3>
<OffenseLocationAssocation> - links Offense1 to Location1
<OffenseLocationAssocation> - links Offense2 to Location2
<OffenseLocationAssocation> - links Offense3 to Location3


Notes


  • States that store addresses or Lat/Long data inside the <IncidentLocation> tag have the information inside the tag applied to the entire incident.

  • States that allow two locations for each offense may also provide two location types for each offense. When a second location is required, create a new <Location> tag and associate it with the relevant offense. For example:

    <Offense1> ... </Offense1>
    <Offense2> ... </Offense2>
    <Offense3> ... </Offense3>
    <Location1> ... </Location1>
    <Location2> ... </Location2>
    <Location3> ... </Location3>
    <Location4> ... </Location4>
    <Location5> ... </Location5>
    <Location6> ... </Location6>
    <OffenseLocationAssocation> - links Offense1 to Location1
    <OffenseLocationAssocation> - links Offense1 to Location2
    <OffenseLocationAssocation> - links Offense2 to Location3
    <OffenseLocationAssocation> - links Offense2 to Location4
    <OffenseLocationAssocation> - links Offense3 to Location5
    <OffenseLocationAssocation> - links Offense3 to Location6