How do I view a DSN6 file as text?
There is a program called mapman that can convert between different formats. The .xplor format is a text-based one, the others are all binary, so that's the one you need. The program runs on linux and mac platforms.
Other crystallographic software suites (ccp4, etc) might have similar capabilities, but this one might be the easiest to install (standalone program).

I want to find the electron density around two atoms within a protein.

This is much easier with a molecular browser. You could just set the contour levels to the ones your are interested in, and take a look. If you need to do this programmatically for thousands of structures though, that will not help you.
It will be kind of tricky to find the right spot in the density, though, because they use fractional coordinates (makes generation of symmetry much easier) and your coordinates are in orthogonal coordinates. If this is a problem, just ask another question.
Here is the description of how data is organized in an .xplor map:

Following the map header, the density matrix is then written section-by-section with c moving slowest (in z-sections). Each section of the density map is preceded by a section number.
Thus, for the formatted map file each section of the density map is written using FORTRAN statements of the type
WRITE(OUNIT,'(I8)') KSECT
WRITE(OUNIT,'(6E12.5)') ((SECTON(I,J),I=1,ISECT),J=1,JSECT)
and the resulting map is written with six pixels on each line. The binary format is identical except the format statements are missing, so that each line that is written contains the entire length of map along the `fast' (a-axis) direction.