code: @Deprecated
      private String extractElements(I_CmsXmlDocument xmlDoc) {
  
          StringBuffer result = new StringBuffer();
          if (xmlDoc instanceof CmsXmlPage) {
              List<?> locales = xmlDoc.getLocales();
              Iterator<?> i = locales.iterator();
              boolean firstIter = true;
              while (i.hasNext()) {
                  if (!firstIter) {
                      result.append("\n\n-----");
                  }
                  Locale locale = (Locale)i.next();
                  result.append("\n\n[").append(locale.toString()).append(']');
                  List<?> elements = xmlDoc.getValues(locale);
                  Iterator<?> j = elements.iterator();
                  while (j.hasNext()) {
                      I_CmsXmlContentValue value = (I_CmsXmlContentValue)j.next();
                      result.append("\n\n[");
                      // output value of name attribute
                      result.append(value.getElement().attribute(0).getValue());
                      result.append("]\n\n");
  
                      I_CmsWidget widget = CmsWidgetUtil.collectWidgetInfo(value).getWidget();
                      result.append(
                          widget.getWidgetStringValue(
                              getCms(),
                              new CmsResourceInfoDialog(getJsp()),
                              (I_CmsWidgetParameter)value));
  
                  }
                  firstIter = false;
              }
          } else if (xmlDoc instanceof CmsXmlContent) {
              CmsXmlContentTextExtractor visitor = new CmsXmlContentTextExtractor(result);
              ((CmsXmlContent)xmlDoc).visitAllValuesWith(visitor);
  
          }
          return result.toString();
      }
docs: Returns the content of all elements of an xml document appended.<p>
  
  @param xmlDoc the xml document to extract the elements from
  @return the content of all elements of an xml document appended