code: private void addLockElement(CmsRepositoryLockInfo lock, Element parent, String lockToken) {
  
          Element activeLockElem = addElement(parent, TAG_ACTIVELOCK);
          addElement(addElement(activeLockElem, TAG_LOCKTYPE), lock.getType());
          addElement(addElement(activeLockElem, TAG_LOCKSCOPE), lock.getScope());
  
          if (lock.getDepth() == CmsRepositoryLockInfo.DEPTH_INFINITY_VALUE) {
              addElement(activeLockElem, TAG_DEPTH).addText(DEPTH_INFINITY);
          } else {
              addElement(activeLockElem, TAG_DEPTH).addText("0");
          }
  
          Element ownerElem = addElement(activeLockElem, TAG_OWNER);
          addElement(ownerElem, TAG_HREF).addText(lock.getOwner());
  
          if (lock.getExpiresAt() == CmsRepositoryLockInfo.TIMEOUT_INFINITE_VALUE) {
              addElement(activeLockElem, TAG_TIMEOUT).addText(TIMEOUT_INFINITE);
          } else {
              long timeout = (lock.getExpiresAt() - System.currentTimeMillis()) / 1000;
              addElement(activeLockElem, TAG_TIMEOUT).addText("Second-" + timeout);
          }
  
          Element lockTokenElem = addElement(activeLockElem, TAG_LOCKTOKEN);
          addElement(lockTokenElem, TAG_HREF).addText("opaquelocktoken:" + lockToken);
      }
docs: Generate a dom element from the given information with all needed subelements to
  add to the parent.<p>
  
  @param lock the lock with the information to create the subelements
  @param parent the parent element where to add the created element
  @param lockToken the lock token to use