Are xrays electromagnetic in nature?

Yes.