<system.xml.serialization> 元素<system.xml.serialization> Element

用于控制 XML 序列化的顶级元素。The top-level element for controlling XML serialization. 有关配置文件的详细信息,请参阅配置文件架构For more information about configuration files, see Configuration File Schema.




特性和元素Attributes and Elements

下列各节描述了特性、子元素和父元素。The following sections describe attributes, child elements, and parent elements.



子元素Child Elements

元素Element 描述Description
<dateTimeSerialization> 元素<dateTimeSerialization> Element 确定 DateTime 对象的序列化模式。Determines the serialization mode of DateTime objects.
<schemaImporterExtensions> 元素<schemaImporterExtensions> Element 包含将 XSD 类型映射到 .NET 类型时 XmlSchemaImporter 所用的类型。Contains types that are used by the XmlSchemaImporter for mapping of XSD types to .NET types.

父元素Parent Elements

元素Element 描述Description
<configuration> 元素<configuration> Element 公共语言运行库和 .NET Framework 应用程序所使用的每个配置文件中的根元素。The root element in every configuration file that is used by the common language runtime and .NET Framework applications.


下面的代码示例演示如何指定 DateTime 对象的序列化模式,以及将 XSD 类型映射到 .NET 类型时 XmlSchemaImporter 所用的其他类型。The following code example illustrates how to specify the serialization mode of a DateTime object, and the addition of types used by the XmlSchemaImporter when mapping XSD types to .NET types.

    <xmlSerializer checkDeserializeAdvances="false" />
    <dateTimeSerialization mode = "Local" />
        name = "MobileCapabilities"
        type = "System.Web.Mobile.MobileCapabilities,
        System.Web.Mobile, Version=, Culture=neutral,
        PublicKeyToken=b03f5f6f11d40a3a" />

请参阅See also