1 17 package org.apache.servicemix.expression; 18 19 import org.apache.servicemix.expression.JAXPStringXPathExpression; 20 21 22 25 public class JAXPXPathExpressionTest extends XPathExpressionTest { 26 27 32 public void testXPathUsingJAXP() throws Exception { 33 boolean test = false; 34 35 try { 36 Class.forName("java.lang.annotation.AnnotationTypeMismatchException"); 37 38 test = true; 39 } catch (ClassNotFoundException doNothing) { 40 } 41 42 if (test) { 43 assertExpression(new JAXPStringXPathExpression("/foo/bar/@xyz"), "cheese", "<foo><bar xyz='cheese'/></foo>"); 44 assertExpression(new JAXPStringXPathExpression("$name"), "James", "<foo><bar xyz='cheese'/></foo>"); 45 } 46 } 47 } 48 | Popular Tags |