if (isAllowStAX()) {
if (isXalanTransformer) {
XMLStreamReader reader = exchange.getContext().getTypeConverter().tryConvertTo(XMLStreamReader.class, exchange, body);
if (reader != null) {
// create a new SAXSource with stax parser API
source = new StaxSource(reader);
}
} else {
source = exchange.getContext().getTypeConverter().tryConvertTo(StAXSource.class, exchange, body);
}
}