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.
from("file:inbox")
.beanRef("inspectPayload") // adds payloadTag to the exchange header
which is the tag name we wish to tokenize on
.split().tokenizeXML("${in.payloadTag}").streaming()
.to("activemq:queue:tags");
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?
Cheers,
Tom