Vital Statistics TownshipsListXml.php - jcobban/Genealogy GitHub Wiki

Up: Vital Statistics Implementation

Source Code

This script is used by Javascript code to obtain a list of registration sub-districts within a county. Registration districts include townships, cities, towns, and larger villages where sub-registrar collected vital statistics registrations to be forwarded to the county registrar and then to the Public Records Office in Toronto.

This script is invoked by method=get and the following parameters may be passed:

Name Contents
Prov a two character province abbreviation
County a three character county abbreviation

This script generates XML rather than JSON because the core of the returned information is a list of <option> statements which are inserted into a <select> statement in the HTML output.

A typical example of the returned XML document is:

<?xml version='1.0' encoding='UTF-8'?>
<select prov='ON' county='Elg'>
    <info>
        <table>'Townships'</table>
        <name>'Townships'</name>
        <prime>array (
  0 => 'domain',
  1 => 'county',
  2 => 'code',
)</prime>
        <srvmg>false</srvmg>
        <fldcount>6</fldcount>
        <order>'Name'</order>
        <classname>'Township'</classname>
        <initrow>array (
  'domain' => 'CAON',
  'prov' => 'ON',
  'county' => NULL,
  'code' => NULL,
  'name' => '',
  'location' => NULL,
)</initrow>
        <query>'SELECT Townships.* FROM Townships WHERE `Domain`=\'CAON\' AND `County`=\'Elg\' ORDER BY Name'</query>
        <count>14</count>
        <countquery>'SELECT COUNT(*) FROM Townships WHERE `Domain`=&#039;CAON&#039; AND `County`=&#039;Elg&#039;'</countquery>
    </info>
  <option value='Aldborough'>Aldborough</option>
  <option value='Aylmer'>Aylmer Village</option>
  <option value='Bayham'>Bayham</option>
  <option value='Dorchester South'>Dorchester South</option>
  <option value='Dunwich'>Dunwich</option>
  <option value='Dutton'>Dutton Village</option>
  <option value='Malahide'>Malahide</option>
  <option value='Port Stanley'>Port Stanley Village</option>
  <option value='Southwold'>Southwold</option>
  <option value='Springfield'>Springfield Village</option>
  <option value='St Thomas City'>St. Thomas City</option>
  <option value='Vienna'>Vienna Village</option>
  <option value='West Lorne'>West Lorne Village</option>
  <option value='Yarmouth'>Yarmouth</option>
</select>

Next: BirthRegQuery.js

⚠️ **GitHub.com Fallback** ⚠️