# I am using the Perl module XML::Simple to reformat the XML file that contains the 1900 census data. The programs knows which file to retrieve because it was passed from the Moreā€¦ link above, and was determined by the getDefaults subroutine above. use XML::Simple; my $xmlref; my $xmlref = XMLin("/home3/pullman/sites/pullman-museum.org/html/XML/$xmlFile"); # Is the actual file name and path ##### houseInformation ##### $aptNumber = $xmlref->{houseInformation}->{aptNumber}; $address = $xmlref->{houseInformation}->{address}; $street = $xmlref->{houseInformation}->{street}; $dwellingNumber = $xmlref->{houseInformation}->{dwellingNumber}; ##### personalInformation ##### $familiesNumber = $xmlref->{personalInformation}->{familiesNumber}; $lastName = $xmlref->{personalInformation}->{lastName}; $firstName = $xmlref->{personalInformation}->{firstName}; $relation = $xmlref->{personalInformation}->{relation}; $race = $xmlref->{personalInformation}->{race}; $sex = $xmlref->{personalInformation}->{sex}; $dobMonth = $xmlref->{personalInformation}->{dobMonth}; $dobYear = $xmlref->{personalInformation}->{dobYear}; $dob = $dobMonth . " " . $dobYear; $age = $xmlref->{personalInformation}->{age}; $maritalStatus = $xmlref->{personalInformation}->{maritalStatus}; $yearsMarried = $xmlref->{personalInformation}->{yearsMarried}; $motherOf = $xmlref->{personalInformation}->{motherOf}; $childrenLiving = $xmlref->{personalInformation}->{childrenLiving}; ##### ancestry ##### $placeOfBirth = $xmlref->{ancestry}->{placeOfBirth}; $placeOfBirthFather = $xmlref->{ancestry}->{placeOfBirthFather}; $placeOfBirthMother = $xmlref->{ancestry}->{placeOfBirthMother}; ##### immigrationStatus ##### $immigrated = $xmlref->{immigrationStatus}->{immigrated}; $yearsInUS = $xmlref->{immigrationStatus}->{yearsInUS}; $naturalized = $xmlref->{immigrationStatus}->{naturalized}; ##### educationAndOccupation ##### $occupation = $xmlref->{educationAndOccupation}->{occupation}; $monthsUnemployed = $xmlref->{educationAndOccupation}->{monthsUnemployed}; $monthsAtSchool = $xmlref->{educationAndOccupation}->{monthsAtSchool}; $read = $xmlref->{educationAndOccupation}->{read}; $write = $xmlref->{educationAndOccupation}->{write}; $english = $xmlref->{educationAndOccupation}->{english}; ##### housingStatus ##### $ownOrRent = $xmlref->{housingStatus}->{ownOrRent}; $ownOrMortgage = $xmlref->{housingStatus}->{ownOrMortgage}; ##### censusInformation ##### $pageNumber = $xmlref->{censusInformation}->{pageNumber}; $lineNumber = $xmlref->{censusInformation}->{lineNumber}; $reelNumber = $xmlref->{censusInformation}->{reelNumber}; $notes = $xmlref->{censusInformation}->{notes}; if ($firstName ne "") { $nameOfPerson = $lastName . ", " . $firstName } else { $nameOfPerson = $lastName } $aptNumber =~ s/Room//g; if ($aptNumber ne "") { $nameOfPerson = $nameOfPerson . " Room " . $aptNumber } print "Content-type: text/html\n\n"; print < $stylesheetlink House Histories. $year Census Information for $nameOfPerson
The Pullman House History Project Welcome to the Pullman Virtual Museum! The Hotel Florence
Pullman Virtual Museum PULLMAN HOUSE HISTORY PROJECT $year Census Information for $nameOfPerson
Name: $nameOfPerson
Address: $address $street
Relation to
Head of Family:
$relation
Sex: $sex
Race: $race
Date of Birth: $dob
Age: $age
Marital Status: $maritalStatus
No. of Years
Married:
$yearsMarried
Mother of How
Many Children:
$motherOf
No. of These
Still Living:
$childrenLiving
Place of Birth: $placeOfBirth
Father's Place
of Birth:
$placeOfBirthFather
Mother's Place
of Birth:
$placeOfBirthMother
Year Immig.
To U.S.
$immigrated
Nat. or Alien? $naturalized
No. of Years
in U.S.
$yearsInUS
Occupation: $occupation
No. of Months
Unemployed:
$monthsUnemployed
Read? $read
Write? $write
Speaks English? $english
No. of Months
In School:
$monthsAtSchool
Owned or Rented? $ownOrRent
Census Page Number $pageNumber
Census Line Number $lineNumber
Census Reel Number $reelNumber
Notes $notes