XmlDocuments 元素 (ContentType)

适用于:SharePoint 2016 |SharePoint Foundation 2013 |SharePoint Online |SharePoint Server 2013

包含 XmlDocument 元素的集合。

定义

<XmlDocuments>
</XmlDocuments>

元素和属性

下面各部分介绍了属性、子元素和父元素。

Attributes

属性

说明

**没有**

子元素

XmlDocument

父元素

ContentType

出现次数

最小值:0

最大值:1

备注

XmlDocuments 元素包含 XmlDocument 元素的集合。

通过添加特殊的 XML 节点,您可以在内容类型定义中包括自定义信息。 这些 XML 节点由内容类型定义中的 XmlDocument 元素表示,并可通过对象模型以编程方式访问。 内容类型可以包括任意数量的 XmlDocument 元素。 每个 XmlDocument 元素的内容可遵循任何给定架构;它们只需要有效的 XML。

有关使用 XmlDocument 元素在您的内容类型中封装自定义信息的详细信息,请参阅Custom Information in Content Types

示例

下面的示例演示一个 XmlDocuments 元素,其中包含一个 XmlDocument 元素,该元素包含指定使用哪种表单模板来显示此内容类型的自定义信息。

有关在 XmlDocument 元素中包含的实际信息的详细信息,请参阅 FormTemplates Schema Overview

    <XmlDocuments>
      <XmlDocument NamespaceURI="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms">
        <FormTemplates xmlns="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms">
          <Display>DocumentLibraryForm</Display>
          <Edit>DocumentLibraryForm</Edit>
          <New>DocumentLibraryForm</New>
        </FormTemplates>
      </XmlDocument>
    </XmlDocuments>

另请参阅