다음을 통해 공유


Property Bag Schema

Applies to: SharePoint Foundation 2010

An elements manifest can define a property bag for a file, folder, list item, or website.

The following is a list of the elements in the Property Bag schema.

<Elements>

   <PropertyBag>

    <Property>

Examples

The following example shows how to add a Location property and its value to the property bag of a website that represents a field office.

<PropertyBag HyperlinkBaseUrl="https://contoso.com/sites/EastEnglandSalesOffice"" Url="" ParentType="Web" RootWebOnly=TRUE" />
    <Property Name="Location" Value="London" Type="string" />
</PropertyBag>

The following example shows how to add a DaysToLive property and its value to the property bag of a list item that represents a temporary price discount. The property specifies how many days the twenty-third list item should be retained before it is deleted from the list. Note that the value of the Type attribute must be a member of the PropertyBagType enumeration. Hence, in this case it must be "int", not "integer".

<PropertyBag HyperlinkBaseUrl="https://contoso.com/sites/EastEnglandSalesOffice"" Url="Lists/CurrentDiscounts" ParentType="ListItem" ItemIndex="23"/>
    <Property Name="DaysToLive" Value="90" Type="int" />
</PropertyBag>