code: private void writeSitemapConfig(CmsXmlContent content, CmsFile sitemapConfigFile)
      throws CmsXmlException, CmsException {
  
          content.correctXmlStructure(m_cms);
          byte[] contentBytes = content.marshal();
          sitemapConfigFile.setContents(contentBytes);
          try {
              CmsLock lock = m_cms.getLock(sitemapConfigFile);
              if (lock.isUnlocked() || !lock.isOwnedBy(m_cms.getRequestContext().getCurrentUser())) {
                  m_cms.lockResourceTemporary(sitemapConfigFile);
              }
              m_cms.writeFile(sitemapConfigFile);
          } finally {
              m_cms.unlockResource(sitemapConfigFile);
          }
      }
docs: Writes a sitemap configuration back to the VFS.<p>
  
  @param content the content to write
  @param sitemapConfigFile the file to which the sitemap config should be written
  
  @throws CmsXmlException if an XML processing error occurs
  @throws CmsException if something goes wrong