XML writeout for simulation