SPContentType.SchemaXml property
取得定義的內容類型的 XML 結構描述。
Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'宣告
Public ReadOnly Property SchemaXml As String
Get
'用途
Dim instance As SPContentType
Dim value As String
value = instance.SchemaXml
public string SchemaXml { get; }
Property value
Type: System.String
XML 結構描述定義的內容類型。
備註
SchemaXml屬性的值是類似的字串如下所示的那一個,傳回哪個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>
SchemaXml屬性會傳回結構描述的當地語系化的版本。若要取得非當地語系化的版本,請使用SchemaXmlWithResourceTokens屬性。
請參閱
參照
Microsoft.SharePoint namespace