convert to XMLstreamreader/writer