XMLInputFactory staxFactory = XMLInputFactory.newInstance(
"javax.xml.stream.XMLInputFactory", getClass().getClassLoader());
XMLStreamReader reader = staxFactory.createXMLStreamReader(in);
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 = true;
Object[] objects = toObjects(document, true);