XML Tokenize

Since Camel 2.14

The XML Tokenize language is a built-in language in camel-stax, which is a truly XML-aware tokenizer that can be used with the Split EIP as the conventional Tokenize to efficiently and effectively tokenize XML documents.

XML Tokenize is capable of not only recognizing XML namespaces and hierarchical structures of the document but also more efficiently tokenizing XML documents than the conventional Tokenize language.

XML Tokenizer Options

The XML Tokenize language supports 5 options, which are listed below.

Name Default Java Type Description

mode

i

Enum

The extraction mode. The available extraction modes are: i - injecting the contextual namespace bindings into the extracted token (default) w - wrapping the extracted token in its ancestor context u - unwrapping the extracted token to its child content t - extracting the text content of the specified element.

Enum values:

  • i

  • w

  • u

  • t

group

Integer

To group N parts together.

headerName

String

Name of header to use as input, instead of the message body It has as higher precedent than the propertyName if both are set.

propertyName

String

Name of property to use as input, instead of the message body. It has a lower precedent than the headerName if both are set.

trim

true

Boolean

Whether to trim the value to remove leading and trailing whitespaces and line breaks.

Example

See Split EIP which has examples using the XML Tokenize language.

Unresolved include directive in modules/languages/pages/xtokenize-language.adoc - include::spring-boot:partial$starter.adoc[]