Package org.apache.commons.jxpath

Examples of org.apache.commons.jxpath.CompiledExpression.iteratePointers()


                try {
                    if (nodeset == null) {
                        iter = NULL_ITER;
                    } else {
                        iter =
                            nodeset.iteratePointers(jxpathContext);
                    }
                } catch (Exception exc) {
                    throw new SAXParseException(exc.getMessage(),
                                                ev.location,
                                                exc);
View Full Code Here


                try {
                    if (nodeset == null) {
                        iter = NULL_ITER;
                    } else {
                        iter =
                            nodeset.iteratePointers(jxpathContext);
                    }
                } catch (Exception exc) {
                    throw new SAXParseException(exc.getMessage(),
                                                ev.location,
                                                exc);
View Full Code Here

                consumer.startElement(startElement.namespaceURI,
                                      startElement.localName,
                                      startElement.raw,
                                      startElement.attributes);
                if (ref != null) {
                    Iterator iter = ref.iteratePointers(jxpathContext);
                    while (iter.hasNext()) {
                        Pointer ptr = (Pointer)iter.next();
                        AttributesImpl attrs = new AttributesImpl();
                        attrs.addAttribute(NS, REF, REF, "CDATA",
                                           ptr.asPath());
View Full Code Here

                CompiledExpression e = (CompiledExpression)compiled;
                boolean oldLenient = jxpathContext.isLenient();
                if (lenient != null) jxpathContext.setLenient(lenient.booleanValue());
                try {
                    Iterator iter =
                        e.iteratePointers(jxpathContext);
                    if (!iter.hasNext()) {
                        return null;
                    }
                    Pointer first = (Pointer)iter.next();
                    if (!iter.hasNext()) {
View Full Code Here

                                                              expr.raw).getNode();
                            // FIXME: workaround for JXPath bug
                            if (val instanceof NativeArray) {
                                iter = new JSIntrospector.NativeArrayIterator((NativeArray)val);
                            } else {
                                iter = compiledExpression.iteratePointers(jxpathContext);
                            }
                        } else if (expr.compiledExpression instanceof org.apache.commons.jexl.Expression) {
                            org.apache.commons.jexl.Expression e =
                                (org.apache.commons.jexl.Expression)expr.compiledExpression;
                            Object result = e.evaluate(jexlContext);
View Full Code Here

            if (compiled instanceof CompiledExpression) {
                CompiledExpression e = (CompiledExpression)compiled;
                boolean oldLenient = jxpathContext.isLenient();
                if (lenient != null) jxpathContext.setLenient(lenient.booleanValue());
                try {
                    Iterator iter = e.iteratePointers(jxpathContext);
                    if (iter.hasNext()) {
                        Pointer first = (Pointer)iter.next();
                        if (iter.hasNext()) {
                            List result = new LinkedList();
                            result.add(first.getNode());
View Full Code Here

                            CompiledExpression compiledExpression = (CompiledExpression)expr.compiledExpression;
                            Object val =
                                compiledExpression.getPointer(jxpathContext, expr.raw).getNode();
                            // FIXME: workaround for JXPath bug
                            iter = val instanceof NativeArray ? new JSIntrospector.NativeArrayIterator((NativeArray)val) :
                                        compiledExpression.iteratePointers(jxpathContext);
                        } else if (expr.compiledExpression instanceof Expression) {
                            Expression e = (Expression)expr.compiledExpression;
                            Object result = e.evaluate(jexlContext);
                            if (result != null) {
                                iter = Introspector.getUberspect().getIterator(result,
View Full Code Here

                                                              expr.raw).getNode();
                            // FIXME: workaround for JXPath bug
                            if (val instanceof NativeArray) {
                                iter = new JSIntrospector.NativeArrayIterator((NativeArray)val);
                            } else {
                                iter = compiledExpression.iteratePointers(jxpathContext);
                            }
                        } else if (expr.compiledExpression instanceof org.apache.commons.jexl.Expression) {
                            org.apache.commons.jexl.Expression e =
                                (org.apache.commons.jexl.Expression)expr.compiledExpression;
                            Object result = e.evaluate(jexlContext);
View Full Code Here

                                                              expr.raw).getNode();
                            // FIXME: workaround for JXPath bug
                            if (val instanceof NativeArray) {
                                iter = new JSIntrospector.NativeArrayIterator((NativeArray)val);
                            } else {
                                iter = compiledExpression.iteratePointers(jxpathContext);
                            }
                        } else if (expr.compiledExpression instanceof org.apache.commons.jexl.Expression) {
                            org.apache.commons.jexl.Expression e =
                                (org.apache.commons.jexl.Expression)expr.compiledExpression;
                            Object result = e.evaluate(jexlContext);
View Full Code Here

            if (compiled instanceof CompiledExpression) {
                CompiledExpression e = (CompiledExpression)compiled;
                boolean oldLenient = jxpathContext.isLenient();
                if (lenient != null) jxpathContext.setLenient(lenient.booleanValue());
                try {
                    Iterator iter = e.iteratePointers(jxpathContext);
                    if (iter.hasNext()) {
                        Pointer first = (Pointer)iter.next();
                        if (iter.hasNext()) {
                            List result = new LinkedList();
                            result.add(first.getNode());
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.