Element conditionvar = (Element) el_respc.selectSingleNode(".//conditionvar");
// there is an evaluation defined (a "resprocessing" element exists)
// if (xpath(count(.//varequal) + count(.//not) = count(.//*)) is
// true, then there are only "not" and "varequal" elements
XPath xCanHandle = DocumentHelper.createXPath("count(.//varequal) + count(.//not) = count(.//*)");
boolean canHandle = xCanHandle.matches(conditionvar);
if (!canHandle) { // maybe we have <condvar> <and> <...>, try again
Element el_and = (Element) conditionvar.selectSingleNode("and");
if (el_and != null) {
canHandle = xCanHandle.matches(el_and);
if (canHandle) { // simultate the el_and to be the conditionvar