code: protected void exportOrgUnits(Element parent) throws CmsImportExportException, SAXException {
  
          try {
              Element orgunitsElement = parent.addElement(CmsImportVersion10.N_ORGUNITS);
              getSaxWriter().writeOpen(orgunitsElement);
  
              I_CmsReport report = getReport();
              List<CmsOrganizationalUnit> allOUs = new ArrayList<CmsOrganizationalUnit>();
              allOUs.add(OpenCms.getOrgUnitManager().readOrganizationalUnit(getCms(), ""));
              allOUs.addAll(OpenCms.getOrgUnitManager().getOrganizationalUnits(getCms(), "", true));
              for (int i = 0; i < allOUs.size(); i++) {
                  CmsOrganizationalUnit ou = allOUs.get(i);
                  report.print(
                      org.opencms.report.Messages.get().container(
                          org.opencms.report.Messages.RPT_SUCCESSION_2,
                          String.valueOf(i + 1),
                          String.valueOf(allOUs.size())),
                      I_CmsReport.FORMAT_NOTE);
                  report.print(Messages.get().container(Messages.RPT_EXPORT_ORGUNIT_0), I_CmsReport.FORMAT_NOTE);
                  report.print(
                      org.opencms.report.Messages.get().container(
                          org.opencms.report.Messages.RPT_ARGUMENT_1,
                          ou.getName()));
                  report.print(org.opencms.report.Messages.get().container(org.opencms.report.Messages.RPT_DOTS_0));
  
                  exportOrgUnit(orgunitsElement, ou);
              }
              getSaxWriter().writeClose(orgunitsElement);
          } catch (CmsImportExportException e) {
              throw e;
          } catch (CmsException e) {
              if (LOG.isDebugEnabled()) {
                  LOG.debug(e.getLocalizedMessage(), e);
              }
              throw new CmsImportExportException(e.getMessageContainer(), e);
          }
      }
docs: Exports all organizational units with all data.<p>
  
  @param parent the parent node to add the organizational units to
  
  @throws CmsImportExportException if something goes wrong
  @throws SAXException if something goes wrong processing the manifest.xml