public XMLStreamReader createXMLStreamReader(XMLDocument document) throws XMLStreamException {
XMLStreamReader reader =
new DataObjectXMLStreamReader(document.getRootObject(), document.getRootElementURI(), document
.getRootElementName(), helperContext.getTypeHelper());
// Wrap the reader so that its position will be START_ELEMENT
return new XMLDocumentStreamReader(reader);
}