camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: Can a split on an xpath ignore namespaces?
Date Wed, 16 Feb 2011 15:15:29 GMT
Hi

No that's not possible. The XPath in the JDK is limited in this
regard. We have looked into this in the past, but didn't find a
solution.



On Wed, Feb 16, 2011 at 4:13 PM, Jeffrey Knight
<jeffrey.knight@gmail.com> wrote:
> Using the XML configuration, is it possible to make <xpath> namespace agnostic
?
>
> Rather than this Camel config (which works, since the XML has an
> explicit namespace):
>
> <camelContext xmlns="http://camel.apache.org/schema/spring"
> xmlns:my="http://my.namespace">
> <route>  [...]
>   <split>
>     <xpath>//my:files</xpath>
>
> I'd rather ignore the namespace in the XML completely and simply have
> this (which isn't working because of the namespacing in the XML):
>
> <camelContext xmlns="http://camel.apache.org/schema/spring">
> <route> [...]
>   <split>
>     <xpath>//files</xpath>
>
>
> The XML being processed looks roughly like this:
>
> <?xml version="1.0" ?>
>    <request xmlns="http://my.namespace">
>        <files> ....
>
> -Jeff
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Mime
View raw message