code: @WebMethod(name = "config.xml")
      public HttpResponse doConfigDotXml(StaplerRequest req) throws IOException {
          if (req.getMethod().equals("GET")) {
              // read
              checkPermission(READ);
              return new HttpResponse() {
                  public void generateResponse(StaplerRequest req, StaplerResponse rsp, Object node) throws IOException, ServletException {
                      rsp.setContentType("application/xml");
                      View.this.writeXml(rsp.getOutputStream());
                  }
              };
          }
          if (req.getMethod().equals("POST")) {
              // submission
              updateByXml(new StreamSource(req.getReader()));
              return HttpResponses.ok();
          }
  
          // huh?
          return HttpResponses.error(SC_BAD_REQUEST, "Unexpected request method " + req.getMethod());
      }
docs: Accepts {@code config.xml} submission, as well as serve it.