One more issue with the XMLStreamReader impl currently in v2: it looks as if it truncates the last event (invariably an END_ELEMENT event). For example, serializing out one of my locally-constructed documents gives: <iq><query></query> missing the final </iq> -David Waite