code: public void actionMoveElement() throws JspException {
  
          // set editor values from request
          try {
              setEditorValues(getElementLocale());
          } catch (CmsXmlException e) {
              // an error occurred while trying to set the values, stop action
              showErrorPage(e);
              return;
          }
          // get the necessary parameters to move the element
          int index = 0;
          try {
              index = Integer.parseInt(getParamElementIndex());
          } catch (Exception e) {
              // ignore, should not happen
          }
  
          // get the value to move
          I_CmsXmlContentValue value = m_content.getValue(getParamElementName(), getElementLocale(), index);
  
          if (getAction() == ACTION_ELEMENT_MOVE_DOWN) {
              // move down the value
              value.moveDown();
          } else {
              // move up the value
              value.moveUp();
          }
          if (getValidationHandler().hasWarnings(getElementLocale())) {
              // there were warnings for the edited content, reset validation handler to avoid display issues
              resetErrorHandler();
          }
          try {
              // write the modified content to the temporary file
              writeContent();
          } catch (CmsException e) {
              // an error occurred while trying to save
              showErrorPage(e);
          }
      }
docs: Moves an element in the xml content either up or down.<p>
  
  Depends on the given action value.<p>
  
  @throws JspException if including the error page fails