...
Available as of Camel 2.13.1, you can set the above inheritNamsepaceTagName property to "*" to include the preceding context in each token (i.e., generating each token enclosed in its ancestor elements). It is noted that each token must share the same ancestor elements in this case.
The above tokenizer works well on simple structures but has some inherent limitations in handling more complex XML structures.
...
The second tokenizer that uses a StAX parser to overcome these limitations. This tokenizer recognizes XML namespaces and also supports complex XML structures.
To split using this tokenizer at {urn:shop}order, we can write
...
Note that this StAX based tokenizer's uses StAX Location API and requires a StAX Reader implementation (e.g., wookdstoxwoodstox) that correctly returns the offset position pointing at to the beginning of each event triggering segment (e.g., the offset position of '<' at each start and end element event).
Splitting files by grouping N lines together
...