docs: protected void exportUser(Element parent, CmsUser user) throws CmsImportExportException, SAXException {
  
          try {
              // add user node to the manifest.xml
              Element e = parent.addElement(CmsImportVersion10.N_USER);
              e.addElement(CmsImportVersion10.N_NAME).addText(user.getSimpleName());
              // encode the password, using a base 64 decoder
              String passwd = new String(Base64.encodeBase64(user.getPassword().getBytes()));
              e.addElement(CmsImportVersion10.N_PASSWORD).addCDATA(passwd);
              e.addElement(CmsImportVersion10.N_FIRSTNAME).addText(user.getFirstname());
              e.addElement(CmsImportVersion10.N_LASTNAME).addText(user.getLastname());
              e.addElement(CmsImportVersion10.N_EMAIL).addText(user.getEmail());
              e.addElement(CmsImportVersion10.N_FLAGS).addText(Integer.toString(user.getFlags()));
              e.addElement(CmsImportVersion10.N_DATECREATED).addText(Long.toString(user.getDateCreated()));
  
              Element userInfoNode = e.addElement(CmsImportVersion10.N_USERINFO);
              List<String> keys = new ArrayList<String>(user.getAdditionalInfo().keySet());
              Collections.sort(keys);
              Iterator<String> itInfoKeys = keys.iterator();
              while (itInfoKeys.hasNext()) {
                  String key = itInfoKeys.next();
                  if (key == null) {
                      continue;
                  }
                  Object value = user.getAdditionalInfo(key);
                  if (value == null) {
                      continue;
                  }
                  Element entryNode = userInfoNode.addElement(CmsImportVersion10.N_USERINFO_ENTRY);
                  entryNode.addAttribute(CmsImportVersion10.A_NAME, key);
                  entryNode.addAttribute(CmsImportVersion10.A_TYPE, value.getClass().getName());
                  try {
                      // serialize the user info and write it into a file
                      entryNode.addCDATA(CmsDataTypeUtil.dataExport(value));
                  } catch (IOException ioe) {
                      getReport().println(ioe);
                      if (LOG.isErrorEnabled()) {
                          LOG.error(
                              Messages.get().getBundle().key(
                                  Messages.ERR_IMPORTEXPORT_ERROR_EXPORTING_USER_1,
                                  user.getName()),
                              ioe);
                      }
                  }
              }
  
              // append node for roles of user
              Element userRoles = e.addElement(CmsImportVersion10.N_USERROLES);
              List<CmsRole> roles = OpenCms.getRoleManager().getRolesOfUser(
                  getCms(),
                  user.getName(),
                  "",
                  true,
                  true,
                  true);
              for (int i = 0; i < roles.size(); i++) {
                  String roleName = roles.get(i).getFqn();
                  userRoles.addElement(CmsImportVersion10.N_USERROLE).addText(roleName);
              }
              // append the node for groups of user
              Element userGroups = e.addElement(CmsImportVersion10.N_USERGROUPS);
              List<CmsGroup> groups = getCms().getGroupsOfUser(user.getName(), true, true);
              for (int i = 0; i < groups.size(); i++) {
                  String groupName = groups.get(i).getName();
                  userGroups.addElement(CmsImportVersion10.N_USERGROUP).addText(groupName);
              }
              // write the XML
              digestElement(parent, e);
          } catch (CmsException e) {
              if (LOG.isDebugEnabled()) {
                  LOG.debug(e.getLocalizedMessage(), e);
              }
              throw new CmsImportExportException(e.getMessageContainer(), e);
          }
      }