High-Tc superconductors: key similarities and differences between electron- and hole-doped cuprates unveiled by X-rays