Restore XML validity.