The microchemical composition and the electronic structure of the two superconductors HgBa2Ca2Cu3O8+delta(Hg-1223) and HgBa2CaCu2O6+delta (Hg-1212) were analyzed with the technique of photoemission with high spatial resolution. This enabled primary spectral peaks to be separated from their satellites due to local charging induced by the primary photon beam. Each sample contains superconducting and impurity phases with inhomogeneous spatial distributions. The oxygenation-induced increase in the critical temperature is related to a increase in the Cu-O plane carrier concentration.