Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
2.14.0
-
None
-
Unknown
Description
In order to be able to use tokenization elements based on the type of the to be processed message I would like to request for support for expressions inside the tokenizeXML DSL element (http://camel.apache.org/splitter.html).
One use-case would be to determine the splitting element by identifying the type of the document in a processor and then provide this information via an exchange property which then can be used inside the attribute of tokenizeXml that supports expressions.
The xpath DSL is not really an alternative as it comes with memory and processing time costs and doesn't work in streaming mode.
A proposal would be to add the following methods to
org.apache.camel.builder.ExpressionClause: public T tokenizeXML(Expression tagName, int group) public T tokenizeXML(Expression tagName)
Though as we need changes to the XML DSL also, we would need to make sure the model fits that too.
eg in other words. Allow to use camel expressions to define which tag name to use.