[
https://issues.apache.org/activemq/browse/CAMEL-3155?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=62108#action_62108
]
Claus Ibsen commented on CAMEL-3155:
------------------------------------
You need to use a namespace in your xpath expression. It can use any kind of
prefix, but the uri must match the default namespace from your xml.
See for example
https://svn.apache.org/repos/asf/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/xml/XPathNamespaceTest.java
> Default namespace not handled by .when(xpath(string))
> -----------------------------------------------------
>
> Key: CAMEL-3155
> URL: https://issues.apache.org/activemq/browse/CAMEL-3155
> Project: Apache Camel
> Issue Type: Improvement
> Components: camel-core
> Affects Versions: 2.4.0
> Environment: Apache Maven 3.0-alpha-5 (r883378; 2009-11-23
> 07:53:41-0800)
> Java version: 1.6.0_17
> Java home: C:\Program Files\Java\jdk1.6.0_17\jre
> Default locale: en_US, platform encoding: Cp1252
> OS name: "windows 7" version: "6.1" arch: "x86" Family: "windows"
> Reporter: Malachi de AElfweald
> Assignee: Claus Ibsen
> Priority: Minor
> Original Estimate: 2 hours
> Remaining Estimate: 2 hours
>
> If I do a .choice().when(xpath("//rootnode")) it fails to find any matches
> unless I preprocess and remove the xmlns="blah" (autogenerated by JAXB on the
> other end)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.