Implement as_xml in subclasses as well