Resets and clear the XML state.

