XNode: adding generate code