Share via


XmlLoadSettings.ProhibitDtd Property

Definition

Gets or sets a value that specifies whether to prohibit or allow the inclusion of a DTD in the XML DOM document.

public:
 property bool ProhibitDtd { bool get(); void set(bool value); };
bool ProhibitDtd();

void ProhibitDtd(bool value);
public bool ProhibitDtd { get; set; }
var boolean = xmlLoadSettings.prohibitDtd;
xmlLoadSettings.prohibitDtd = boolean;
Public Property ProhibitDtd As Boolean

Property Value

Boolean

bool

True to prohibit the inclusion of a DTD in the XML DOM document; false to allow the inclusion. The default value is true.

Remarks

This property allows you to prohibit DTD use and can help prevent a denial of service attack in some situations. For example, an application might become unresponsive if a large number of entity references are included with the DTD and require resolution when the document XML is parsed and loaded.

Applies to