camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bob Jolliffe <>
Subject xpath and namespaces
Date Mon, 23 Apr 2012 16:23:27 GMT
I have an application where I load a camel context using spring and
then add different spring dsl routes particular to individual site

I am having trouble using an XPath splitter because of the issue with
making namespaces visible to the XPath processor.

I've seen from here
that if the route is defined within a camel context, then you can make
the namespace visible in the usual way, as a xmlns declaration in the
root (context) element.

But this doesn't seem to work if I am loading just a route into an
existing context.

<route xmlns:xsi=""

  <description>Import Metadata</description>
  <!-- every now and again ... -->
  <from uri="quartz://halfminute?trigger.repeatInterval=300000&amp;trigger.repeatCount=10"/>
      <to .... />

Camel complains that the xpath expression is illegal.  Has anyone come
across (and maybe solved) this problem before?

I've had a look at the tokenize xml approach, which seems nice (and
efficient) but again it doesn't seem to handle namespaces.

Any advice welcome.


View raw message