XMLStreamReader2XMLDocument transformer = new XMLStreamReader2XMLDocument();
TransformationContext context = new TransformationContextImpl();
DataType<QName> binding = new DataType<QName>(DataObject.class, null);
binding.setMetadata(TypeHelper.class.getName(), callback.getTypeHelper());
context.setTargetDataType(binding);
XMLDocument document = transformer.transform(reader, context);
boolean isWrapped = false;
return toObjects(document, isWrapped);
} catch (Exception e) {
//REVISIT: better handling of exceptions