Export (0) Print
Expand All

SPContentType.SchemaXml Property

Windows SharePoint Services 3

Gets the XML schema that defines the content type.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

'Declaration
Public ReadOnly Property SchemaXml As String
	Get
'Usage
Dim instance As SPContentType
Dim value As String

value = instance.SchemaXml

Property Value

Type: System.String
A String object that contains the XML schema.

The value of the SchemaXml property is a string similar to the one shown below, which is returned for the Folder content type.

<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="http://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="http://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="http://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="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms">
      <FormTemplates xmlns="http://schemas.microsoft.com/sharepoint/v3/contenttype/forms">
        <Display>ListForm</Display>
        <Edit>ListForm</Edit>
        <New>ListForm</New>
      </FormTemplates>
    </XmlDocument>
  </XmlDocuments>
</ContentType>

Community Additions

ADD
Show:
© 2014 Microsoft