DtdProcessing 枚举

定义

指定用于处理 DTD 的选项。 DtdProcessing 枚举由 XmlReaderSettings 类使用。The DtdProcessing enumeration is used by the XmlReaderSettings class.

public enum class DtdProcessing
public enum DtdProcessing
type DtdProcessing = 
Public Enum DtdProcessing
继承
DtdProcessing

字段

Ignore 1

将导致忽略 DOCTYPE 元素。Causes the DOCTYPE element to be ignored. 未发生 DTD 处理,且 DTD/DOCTYPE 在输出中丢失。No DTD processing occurs, and the DTD/DOCTYPE is lost on output.

Parse 2

用于分析 DTD。Used for parsing DTDs.

Prohibit 0

指定在遇到 DTD 时将引发 XmlException,同时有消息指示禁用 DTD。Specifies that when a DTD is encountered, an XmlException is thrown with a message that states that DTDs are prohibited. 这是默认行为。This is the default behavior.

注解

此枚举在XmlReaderSettings.DtdProcessing属性XmlTextReader.DtdProcessing或属性上设置。This enumeration is set on the XmlReaderSettings.DtdProcessing property or the XmlTextReader.DtdProcessing property.

适用于