System::Xml::WriteState 枚举

WriteState enum

指定 XmlWriter 的状态。

enum class WriteState

名称描述
Start0指示 XmlWriter::Write 方法尚未被调用。
Prolog1指示正在写入 prolog。
Element2指示正在写入元素的开始标签。
Attribute3指示正在写入属性值。
Content4指示正在写入元素内容。
Closed5指示已调用 XmlWriter::Close 方法。
Error6抛出了异常,导致 XmlWriter 处于无效状态。您可以调用 XmlWriter::Close 方法将 XmlWriter 设置为 WriteState::Closed 状态。对其他任何 XmlWriter 方法的调用都会导致 InvalidOperationException。

另见