code: public void addModelPageToSitemapConfiguration(CmsResource sitemapConfig, CmsResource modelPage, boolean disabled)
      throws CmsException {
  
          CmsFile sitemapConfigFile = m_cms.readFile(sitemapConfig);
          CmsXmlContent content = CmsXmlContentFactory.unmarshal(m_cms, sitemapConfigFile);
          CmsConfigurationReader reader = new CmsConfigurationReader(m_cms);
          reader.parseConfiguration(m_adeConfig.getBasePath(), content);
          List<CmsModelPageConfig> modelPageConfigs = reader.getModelPageConfigs();
  
          int i = 0;
          boolean isDefault = false;
          for (CmsModelPageConfig config : modelPageConfigs) {
              if (config.getResource().getStructureId().equals(modelPage.getStructureId())) {
                  isDefault = config.isDefault();
                  break;
              }
              i += 1;
          }
          if (i >= modelPageConfigs.size()) {
              content.addValue(m_cms, CmsConfigurationReader.N_MODEL_PAGE, Locale.ENGLISH, i);
          }
          String prefix = CmsConfigurationReader.N_MODEL_PAGE + "[" + (1 + i) + "]";
          content.getValue(prefix + "/" + CmsConfigurationReader.N_PAGE, Locale.ENGLISH).setStringValue(
              m_cms,
              modelPage.getRootPath());
          content.getValue(prefix + "/" + CmsConfigurationReader.N_DISABLED, Locale.ENGLISH).setStringValue(
              m_cms,
              "" + disabled);
          content.getValue(prefix + "/" + CmsConfigurationReader.N_IS_DEFAULT, Locale.ENGLISH).setStringValue(
              m_cms,
              "" + isDefault);
          writeSitemapConfig(content, sitemapConfigFile);
      }
docs: Adds a model page to the sitemap config.<p>
  
  @param sitemapConfig the sitemap configuration resource
  @param modelPage the model page to add
  @param disabled true if the model page should be added as 'disabled'
  
  @throws CmsException if something goes wrong