replacing temp xml with final