Nope, there is no support for doing that in Stax API, or in Woodstox' extended API (stax2-api).
You could use XMLEventReader
, store events, if that helps. It is still more efficient than re-parsing, although uses more memory than just holding on to underlying XML content.