That record lists where each of the parents are from - not necessarily where they currently reside as many other parishes did and we would assume with no information to the contrary.
So Johanne Sofie Johannesdtr is from Tøyengaden (sounds a lot like a street name) and Martin Hansen is from the district of Nittedal (in Akershus) and he currently appears to be in the military.
Hopefully this will be a reliable link to the correct page for that record - http://www.arkivverket.no/URN:kb_read?idx_kildeid=570&id...
Familysearch.org indicates a Martin Hansen born at the end of 1827 in Nittedal. That was a quick way to search - but a better search would be to search carefully through several years in that parish for possible matches, then check confirmation records to make sure that child at least survived childhood.