code: private void replaceFormatterPaths(CmsModule targetModule) throws CmsException, UnsupportedEncodingException {
  
          CmsResource formatterSourceFolder = getCms().readResource(
              "/system/modules/" + m_cloneInfo.getFormatterSourceModule() + "/");
          CmsResource formatterTargetFolder = getCms().readResource(
              "/system/modules/" + m_cloneInfo.getFormatterTargetModule() + "/");
          for (I_CmsResourceType type : targetModule.getResourceTypes()) {
              String schemaPath = type.getConfiguration().get("schema");
              CmsResource res = getCms().readResource(schemaPath);
              CmsFile file = getCms().readFile(res);
              if (CmsResourceTypeXmlContent.isXmlContent(file)) {
                  CmsXmlContent xmlContent = CmsXmlContentFactory.unmarshal(getCms(), file);
                  xmlContent.setAutoCorrectionEnabled(true);
                  file = xmlContent.correctXmlStructure(getCms());
              }
              String encoding = CmsLocaleManager.getResourceEncoding(getCms(), file);
              String content = new String(file.getContents(), encoding);
              content = content.replaceAll(formatterSourceFolder.getRootPath(), formatterTargetFolder.getRootPath());
              file.setContents(content.getBytes(encoding));
              getCms().writeFile(file);
          }
      }
docs: Replaces the referenced formatters within the new XSD files with the new formatter paths.<p>
  
  @param targetModule the target module
  
  @throws CmsException if something goes wrong
  @throws UnsupportedEncodingException if the file content could not be read with the determined encoding