Hi

In release 2.3.0 given the following XML

"<foo><bar>cheese</bar></foo>"
XPathBuilder.xpath("foo/bar").evaluate(exchange, String.class);
returns  "<bar>cheese</bar>"

See test below.
Is this the correct behavior or a bug?


Regards Lars


In Camel 2.2.0 the following test is true

      public void testXpath(){
                
                Exchange exchange = new DefaultExchange(context);
                exchange.getIn().setBody("<foo><bar>cheese</bar></foo>");
                
                String value =
XPathBuilder.xpath("foo/bar").evaluate(exchange, String.class);
                
                Assert.assertEquals("cheese", value); 
      }

In Camel 2.3.0 the following test is true


      public void testXpath(){
                
                Exchange exchange = new DefaultExchange(context);
                exchange.getIn().setBody("<foo><bar>cheese</bar></foo>");
                
                String value =
XPathBuilder.xpath("foo/bar").evaluate(exchange, String.class);
                
                Assert.assertEquals("<bar>cheese</bar>", value); 
      }
-- 
View this message in context: 
http://old.nabble.com/release-2.3.0-XPathBuilder.xpath-evaluate-gives-different-result-tp28705231p28705231.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to