public String getPath(XmlText text) {
      XmlTag parent = PsiTreeUtil.getParentOfType(text, XmlTag.class);

      return ((parent != null) && (parent != context)) ? (getPath(parent) + "/text()")
                                                       : "text()";
    }
public String getPath(XmlText text)