XMLEventReader reader = factory.createXMLEventReader(stream);
StartDocument startdoc = (StartDocument) reader.nextEvent();
assertEquals("UTF-8", startdoc.getCharacterEncodingScheme());
assertEquals("1.0", startdoc.getVersion());
assertTrue(reader.hasNext());
XMLEvent event = reader.nextEvent();
assertTrue(event.isStartElement());
event = reader.nextEvent();
assertTrue(event.isCharacters());
String c = event.asCharacters().getData();
event = reader.nextEvent();