code: public static Node getFirstApplyNode(CMMLInfo cmmlInfo) throws XPathExpressionException {
          // 1. search for a separate cmml semantic
          XPath xpath = XMLHelper.namespaceAwareXpath("m", CMMLInfo.NS_MATHML);
          Node applyRoot = getElement(cmmlInfo, "m:math/m:semantics/m:annotation-xml[@encoding='MathML-Content']/m:apply", xpath);
          if (applyRoot == null) {
              // 2. search for a main cmml semantic
              applyRoot = getElement(cmmlInfo, "*//m:semantics/m:apply", xpath);
              if (applyRoot == null) {
                  // 3. try to take the apply right beneath the math elements
                  applyRoot = getElement(cmmlInfo, "m:math/m:apply", xpath);
              }
          }
          return applyRoot;
      }
docs: Get the root apply node from the content mathml.
  It will search for the first node of the MathML-Content annotations
  or the semantics/apply node within a CMMLInfo document.
  
  @param cmmlInfo CMMLInfo document
  @return first node of the MathML-Content annotations within a MathML document
  @throws XPathExpressionException parser exception