camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tom Ellis <>
Subject Dynamic tokenizeXML tagname
Date Wed, 18 Sep 2013 09:07:05 GMT
Hi Everyone,

Is it possible to have a dynamic tagName parameter specified for the
tokenizeXML function of the Tokenizer language?

For example, say as part of a route I inspect a big incoming payload
and determine that it is of type Orders, so wish to set my tagName as
"order". However on the same route Parts could be sent, so I wish to
tokenize based on the tagName "part".

I was hoping that maybe I could build it using a Simple expression or
something, e.g.

  .beanRef("inspectPayload") // adds payloadTag to the exchange header
which is the tag name we wish to tokenize on

but from the code it seems that tokenizeXML uses the tagName specified
to build the start and end tokens.

Does anyone have any ideas on how I could do this without having to
specify a route for each incoming type?



View raw message