XML writeout for structure