Type Reason InvalidOperationException The XmlWriter.WriteState is WriteState.Closed.
This method does not escape special characters.
The System.Xml.XmlWriter does not validate the data that is passed to the XmlWriter.WriteRaw(string) method. You should not pass arbitrary data to this method.
For the asynchronous version of this method, see XmlWriter.WriteRawAsync(string).