XMLStreamHelper streamHelper = SDOUtil.createXMLStreamHelper(helperContext.getTypeHelper());
QName elementName = SDOContextHelper.getElement(context.getSourceDataType());
XMLHelper xmlHelper = helperContext.getXMLHelper();
XMLDocument document =
xmlHelper.createDocument(source, elementName.getNamespaceURI(), elementName.getLocalPart());
return streamHelper.createXMLStreamReader(document);
} catch (XMLStreamException e) {
// TODO: Add context to the exception
throw new TransformationException(e);
}
}