Implement XML hook.