code: protected void addContentValue(CmsXmlContent content, Locale locale, String path, String value) {
  
          boolean hasValue = content.hasValue(path, locale);
          if (!hasValue) {
              String[] pathElements = path.split("/");
              String currentPath = pathElements[0];
              for (int i = 0; i < pathElements.length; i++) {
                  if (i > 0) {
                      currentPath = CmsStringUtil.joinPaths(currentPath, pathElements[i]);
                  }
                  while (!content.hasValue(currentPath, locale)) {
                      content.addValue(m_cms, currentPath, locale, CmsXmlUtils.getXpathIndexInt(currentPath) - 1);
                  }
              }
          }
          content.getValue(path, locale).setStringValue(m_cms, value);
  
      }
docs: Adds the given value to the content document.<p>
  
  @param content the content document
  @param locale the content locale
  @param path the value XPath
  @param value the value