code: public static String getValueForPath(CmsEntity entity, String[] pathElements) {
  
          String result = null;
          if ((pathElements != null) && (pathElements.length >= 1)) {
              String attributeName = pathElements[0];
              int index = CmsContentDefinition.extractIndex(attributeName);
              if (index > 0) {
                  index--;
              }
              attributeName = entity.getTypeName() + "/" + CmsContentDefinition.removeIndex(attributeName);
              CmsEntityAttribute attribute = entity.getAttribute(attributeName);
              if (!((attribute == null) || (attribute.isComplexValue() && (pathElements.length == 1)))) {
                  if (attribute.isSimpleValue()) {
                      if ((pathElements.length == 1) && (attribute.getValueCount() > 0)) {
                          List<String> values = attribute.getSimpleValues();
                          result = values.get(index);
                      }
                  } else if (attribute.getValueCount() > (index)) {
                      String[] childPathElements = new String[pathElements.length - 1];
                      for (int i = 1; i < pathElements.length; i++) {
                          childPathElements[i - 1] = pathElements[i];
                      }
                      List<CmsEntity> values = attribute.getComplexValues();
                      result = getValueForPath(values.get(index), childPathElements);
                  }
              }
          }
          return result;
      }
docs: Returns the value of a simple attribute for the given path or <code>null</code>, if the value does not exist.<p>
  
  @param entity the entity to get the value from
  @param pathElements the path elements
  
  @return the value