optimized xml export