XmlLoadSettings 类

定义

包含加载和分析 XML 文档期间使用的设置。 为最高安全性选择默认设置。 此类可以实例化, 并由 LoadXmlLoadFromUriAsyncLoadFromFileAsync 接受。

public ref class XmlLoadSettings sealed
/// [Windows.Foundation.Metadata.Activatable(65536, Windows.Foundation.UniversalApiContract)]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class XmlLoadSettings final
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]
class XmlLoadSettings final
[Windows.Foundation.Metadata.Activatable(65536, typeof(Windows.Foundation.UniversalApiContract))]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class XmlLoadSettings
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]
public sealed class XmlLoadSettings
function XmlLoadSettings()
Public NotInheritable Class XmlLoadSettings
继承
Object Platform::Object IInspectable XmlLoadSettings
属性

Windows 要求

设备系列
Windows 10 (在 10.0.10240.0 中引入)
API contract
Windows.Foundation.UniversalApiContract (在 v1.0 中引入)

构造函数

XmlLoadSettings()

创建新的 XmlLoadSettings 对象。

属性

ElementContentWhiteSpace

指定默认处理是否保留空格。

MaxElementDepth

获取并设置要加载到 DOM 对象的 XML 文档的元素深度限制。

ProhibitDtd

获取或设置一个值,该值指定是禁止还是允许在 XML DOM 文档中包含 DTD。

ResolveExternals

获取或设置一个值,该值指定在分析文档时是否解析外部定义、可解析命名空间、文档类型定义的外部子集 (DTD 和外部实体引用) 。

ValidateOnParse

获取或设置一个值,该值指定 XML 分析程序是否应根据加载时的文档类型定义 (DTD) 验证此文档。

适用于