camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From klua <>
Subject Camel Splitter with Xpath recognizes namespace, but returns null
Date Tue, 09 Aug 2011 17:57:02 GMT

I am using Camel's Spring DSL, to write a simple application, that takes
xml, and splits it based on the xpath. It should be pretty straightforward;
there is only one extra step that I have, which is declaring a namespace.
The problem is that although xpath recognizes the element that I'm looking
for, it returns a null for the value.
Here's a sample xml, to give you a general idea of what I'm doing. (Notice
that it has an associated namespace)


      <foo:id idScheme="12345">1</foo:id>

      <foo:id idScheme="45678">2</foo:id>


Here's my route:
    <from uri="direct:start">
        <to uri="mock:result"/>

As I mentioned before, I declare the namespace, in the bean context of
 xmlns:foo="some URL"
 xmlns:bar="some URL"
And I get the expected number of results from xpath, but null values. Any
idea where I'm going wrong? Any help would be greatly appreciated! Thanks!

View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message