Move save_extension_xml to the extension->xml class method.