Yes, you're correct. I didn't think I contradicted myself though - Entity should define to_xml in this case, it's not the job of the formatter to know it's dealing with something called Entity.