Updated XML writing.