code: @WebMethod(name = "config.xml")
      public void doConfigDotXml(StaplerRequest req, StaplerResponse rsp)
              throws IOException, ServletException {
  
          if (req.getMethod().equals("GET")) {
              // read
              checkPermission(EXTENDED_READ);
              rsp.setContentType("application/xml");
              Node node = getNode();
              if (node == null) {
                  throw HttpResponses.notFound();
              }
              Jenkins.XSTREAM2.toXMLUTF8(node, rsp.getOutputStream());
              return;
          }
          if (req.getMethod().equals("POST")) {
              // submission
              updateByXml(req.getInputStream());
              return;
          }
  
          // huh?
          rsp.sendError(SC_BAD_REQUEST);
      }
docs: Accepts {@code config.xml} submission, as well as serve it.