Overridden equals and written XML mark-up.