X-ray photoemission spectroscopy of nonmetallic materials: Electronic structures of boron and BxOy