if (reader.getEventType() != XMLStreamConstants.START_ELEMENT)
throw new IllegalStateException();
// StAX2SAXAdapter won't produce START_DOCUMENT if the reader is posisitioned at START_ELEMENT and the EMF loader will fail
// Wrap the reader so it represents a document
reader = new XMLDocumentStreamReader(reader);
return loadDocument(reader, options).getRootObject();
}