// get the iteration elements and iterate through the list,
// this call will also detach all the iteration elements
List splitElements = EIPUtils.getDetachedMatchingElements(envelope, expression);
if (synLog.isTraceOrDebugEnabled()) {
synLog.traceOrDebug("Splitting with XPath : " + expression + " resulted in " +
splitElements.size() + " elements");
}
// if not preservePayload remove all the child elements
if (!preservePayload && envelope.getBody() != null) {