code: def xml(func):
      
      if inspect.isclass(func):
          apply_function_to_members(func, xml)
          return func
      else:
          @functools.wraps(func)
          def decorated_view(*args, **kwargs):
              data = func(*args, **kwargs)
              return _build_response(data, dicttoxml)
          return decorated_view
docs: Decorator to render as XML
      :param func:
      :return: