XmlWriterSettings.WriteEndDocumentOnClose XmlWriterSettings.WriteEndDocumentOnClose XmlWriterSettings.WriteEndDocumentOnClose XmlWriterSettings.WriteEndDocumentOnClose Property

定義

取得或設定值,指出 XmlWriter 是否會在呼叫 Close() 方法時,將結尾標記加入至所有未封閉的項目標記。Gets or sets a value that indicates whether the XmlWriter will add closing tags to all unclosed element tags when the Close() method is called.

public:
 property bool WriteEndDocumentOnClose { bool get(); void set(bool value); };
public bool WriteEndDocumentOnClose { get; set; }
member this.WriteEndDocumentOnClose : bool with get, set
Public Property WriteEndDocumentOnClose As Boolean

屬性值

如果將關閉所有未封閉的項目標記,則為 true,否則為 falsetrue if all unclosed element tags will be closed out; otherwise, false. 預設值為 trueThe default value is true.

備註

如果您將此旗標false設定為, 輸出 XML 檔案的格式可能會不正確。If you set this flag to false, the output XML file may not be well-formed.

適用於