emit xml for resource if client wants it