* @throws XMLStreamException
*/
private static void reader2writer(XMLStreamReader reader,
XMLStreamWriter writer) throws XMLStreamException {
StAXOMBuilder builder = new StAXOMBuilder(reader);
builder.releaseParserOnClose(true);
try {
OMDocument omDocument = builder.getDocument();
Iterator it = omDocument.getChildren();
while (it.hasNext()) {
// TODO: this is extremely inefficient since next() will actually build the node!