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
public class TokenXMLExpressionIterator extends ExpressionAdapter
Expressionto walk aMessageXML body using anIterator, 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 toInputStreamtype 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 Modifier and Type Field Description protected StringinheritNamespaceTokenprotected StringtagToken
-
Constructor Summary
Constructors Constructor Description TokenXMLExpressionIterator(String tagToken, String inheritNamespaceToken)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Iterator<?>createIterator(org.apache.camel.Exchange exchange, InputStream in, String charset)protected ObjectdoEvaluate(org.apache.camel.Exchange exchange, boolean closeStream)Strategy to evaluate the exchangeObjectevaluate(org.apache.camel.Exchange exchange)booleanmatches(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
-
-
-
-
Method Detail
-
createIterator
protected Iterator<?> createIterator(org.apache.camel.Exchange exchange, InputStream in, String charset)
-
matches
public boolean matches(org.apache.camel.Exchange exchange)
- Specified by:
matchesin interfaceorg.apache.camel.Predicate- Overrides:
matchesin classExpressionSupport
-
evaluate
public Object evaluate(org.apache.camel.Exchange exchange)
- Overrides:
evaluatein classExpressionSupport
-
doEvaluate
protected Object doEvaluate(org.apache.camel.Exchange exchange, boolean closeStream)
Strategy to evaluate the exchange- Parameters:
exchange- the exchangecloseStream- whether to close the stream before returning from this method.- Returns:
- the evaluated value
-
-