code: public static String getFirstXpathElement(String path) {
  
          int pos = path.indexOf('/');
          if (pos >= 0) {
              path = path.substring(0, pos);
          }
  
          return CmsXmlUtils.removeXpathIndex(path);
      }
docs: Returns the first Xpath element from the provided path,
  without the index value.<p>
  
  Examples:<br>
  <code>title</code> is left untouched<br>
  <code>title[1]</code> becomes <code>title</code><br>
  <code>title/subtitle</code> becomes <code>title</code><br>
  <code>title[1]/subtitle[1]</code> becomes <code>title</code><p>
  
  @param path the path to get the first Xpath element from
  
  @return the first Xpath element from the provided path