SPContentType.SchemaXml - Propriété

Obtient le schéma XML qui définit le type de contenu.

Espace de noms :  Microsoft.SharePoint
Assembly :  Microsoft.SharePoint (dans Microsoft.SharePoint.dll)

Syntaxe

'Déclaration
Public ReadOnly Property SchemaXml As String
    Get
'Utilisation
Dim instance As SPContentType
Dim value As String

value = instance.SchemaXml
public string SchemaXml { get; }

Valeur de propriété

Type : System.String
Le schéma XML qui définit le type de contenu.

Remarques

La valeur de la propriété SchemaXml est une chaîne similaire à celle présentée ci-dessous, qui est retourné pour le type de contenu de Folder .

<ContentType ID="0x0120" Name="Folder" Group="Folder Content Types" 
             Description="Create a new folder." Sealed="TRUE" 
             Version="0" FeatureId="{695b6570-a48b-4a8e-8ea5-26ea7fc1d162}">
  <Folder TargetName="_cts/Folder" />
  <Fields>
    <Field ID="{c042a256-787d-4a6f-8a8a-cf6ab767f12d}" Name="ContentType" 
           SourceID="https://schemas.microsoft.com/sharepoint/v3" 
           StaticName="ContentType" Group="_Hidden" RowOrdinal="0" 
           Type="Text" DisplayName="Content Type" ReadOnly="TRUE" 
           Sealed="TRUE" ColName="tp_ContentType" 
           PITarget="MicrosoftWindowsSharePointServices" 
           PIAttribute="ContentTypeID" Customization="" />
    <Field ID="{fa564e0f-0c70-4ab9-b863-0177e6ddd247}" Name="Title" 
           SourceID="https://schemas.microsoft.com/sharepoint/v3" 
           StaticName="Title" Group="_Hidden" Type="Text" 
           DisplayName="Title" Required="FALSE" 
           FromBaseType="TRUE" Hidden="TRUE" Customization="" />
    <Field ID="{8553196d-ec8d-4564-9861-3dbe931050c8}" Name="FileLeafRef" 
           SourceID="https://schemas.microsoft.com/sharepoint/v3" 
           StaticName="FileLeafRef" Group="_Hidden" ShowInFileDlg="FALSE" 
           ShowInVersionHistory="FALSE" Type="File" 
           DisplayName="Name" AuthoringInfo="(for use in forms)" 
           List="Docs" FieldRef="ID" ShowField="LeafName" 
           JoinColName="DoclibRowId" JoinRowOrdinal="0" JoinType="INNER" 
           Required="TRUE" Hidden="FALSE" Customization=""></Field>
  </Fields>
  <XmlDocuments>
    <XmlDocument NamespaceURI="https://schemas.microsoft.com/sharepoint/v3/contenttype/forms">
      <FormTemplates xmlns="https://schemas.microsoft.com/sharepoint/v3/contenttype/forms">
        <Display>ListForm</Display>
        <Edit>ListForm</Edit>
        <New>ListForm</New>
      </FormTemplates>
    </XmlDocument>
  </XmlDocuments>
</ContentType>

La propriété SchemaXml renvoie une version localisée du schéma. Pour obtenir une version non localisée, utilisez la propriété SchemaXmlWithResourceTokens .

Voir aussi

Référence

SPContentType classe

SPContentType - Membres

Microsoft.SharePoint - Espace de noms

SchemaXmlWithResourceTokens

Autres ressources

Content Type Definition Schema