Package org.apache.camel.support.builder
Class TokenXMLExpressionIterator
java.lang.Object
org.apache.camel.support.ExpressionSupport
org.apache.camel.support.ExpressionAdapter
org.apache.camel.support.builder.TokenXMLExpressionIterator
- All Implemented Interfaces:
org.apache.camel.Expression
,org.apache.camel.Predicate
Expression
to walk a Message
XML body using an
Iterator
, which grabs the content between a XML start and end token, where the end token
corresponds implicitly to either the end tag or the self-closing start tag.
The message body must be able to convert to InputStream
type which is used as stream to access the
message body.
Can be used to split big XML files.
This implementation supports inheriting namespaces from a parent/root tag.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Iterator<?>
createIterator
(org.apache.camel.Exchange exchange, InputStream in, String charset) protected Object
doEvaluate
(org.apache.camel.Exchange exchange, boolean closeStream) Strategy to evaluate the exchangeevaluate
(org.apache.camel.Exchange exchange) boolean
matches
(org.apache.camel.Exchange exchange) Methods inherited from class org.apache.camel.support.ExpressionAdapter
assertionFailureMessage, evaluate, init
Methods inherited from class org.apache.camel.support.ExpressionSupport
assertMatches
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.camel.Predicate
initPredicate
-
Field Details
-
tagToken
-
inheritNamespaceToken
-
-
Constructor Details
-
TokenXMLExpressionIterator
-
-
Method Details
-
createIterator
protected Iterator<?> createIterator(org.apache.camel.Exchange exchange, InputStream in, String charset) -
matches
public boolean matches(org.apache.camel.Exchange exchange) - Specified by:
matches
in interfaceorg.apache.camel.Predicate
- Overrides:
matches
in classExpressionSupport
-
evaluate
- Overrides:
evaluate
in classExpressionSupport
-
doEvaluate
Strategy to evaluate the exchange- Parameters:
exchange
- the exchangecloseStream
- whether to close the stream before returning from this method.- Returns:
- the evaluated value
-