code: private void extractXPathValidateExpressions(
              Element validateElement, Map<String, Object> validateXpathExpressions) {
          //check for xpath validation - old style with direct attribute
          String pathExpression = validateElement.getAttribute("path");
          if (StringUtils.hasText(pathExpression) && !JsonPathMessageValidationContext.isJsonPathExpression(pathExpression)) {
              //construct pathExpression with explicit result-type, like boolean:/TestMessage/Value
              if (validateElement.hasAttribute("result-type")) {
                  pathExpression = validateElement.getAttribute("result-type") + ":" + pathExpression;
              }
  
              validateXpathExpressions.put(pathExpression, validateElement.getAttribute("value"));
          }
  
          //check for xpath validation elements - new style preferred
          List<?> xpathElements = DomUtils.getChildElementsByTagName(validateElement, "xpath");
          if (xpathElements.size() > 0) {
              for (Iterator<?> xpathIterator = xpathElements.iterator(); xpathIterator.hasNext();) {
                  Element xpathElement = (Element) xpathIterator.next();
                  String expression = xpathElement.getAttribute("expression");
                  if (StringUtils.hasText(expression)) {
                      //construct expression with explicit result-type, like boolean:/TestMessage/Value
                      if (xpathElement.hasAttribute("result-type")) {
                          expression = xpathElement.getAttribute("result-type") + ":" + expression;
                      }
  
                      validateXpathExpressions.put(expression, xpathElement.getAttribute("value"));
                  }
              }
          }
      }
docs: Extracts xpath validation expressions and fills map with them
  @param validateElement
  @param validateXpathExpressions