Package org.dom4j

Examples of org.dom4j.XPath.matches()


            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
View Full Code Here


            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
                  conditionvar = el_and;
                }
              } else { // and finally, maybe we have an <or> element ..
                Element el_or = (Element) conditionvar.selectSingleNode("or");
View Full Code Here

                  conditionvar = el_and;
                }
              } else { // and finally, maybe we have an <or> element ..
                Element el_or = (Element) conditionvar.selectSingleNode("or");
                if (el_or != null) {
                  canHandle = xCanHandle.matches(el_or);
                  if (canHandle) { // simultate the el_and to be the conditionvar
                    conditionvar = el_or;
                  }
                }
              }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.