code: public String renderSitemap() throws CmsException {
  
          StringBuffer buffer = new StringBuffer();
          List<CmsXmlSitemapUrlBean> urlBeans = generateSitemapBeans();
          buffer.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
          buffer.append(getUrlSetOpenTag() + "\n");
          for (CmsXmlSitemapUrlBean bean : urlBeans) {
              buffer.append(getXmlForEntry(bean));
              buffer.append("\n");
          }
          buffer.append("</urlset>");
          return buffer.toString();
      }
docs: Generates a sitemap and formats it as a string.<p>
  
  @return the sitemap XML data
  
  @throws CmsException if something goes wrong