Lists.UpdateContentTypeXmlDocument Method

Adds or overwrites the specified XMLDocument element in the specified list content type.

Web Service: ListsWeb Reference: http://<Site>/_vti_bin/Lists.asmx

Syntax

<SoapDocumentMethodAttribute("http://schemas.microsoft.com/sharepoint/soap/UpdateContentTypeXmlDocument", RequestNamespace:="http://schemas.microsoft.com/sharepoint/soap/", ResponseNamespace:="http://schemas.microsoft.com/sharepoint/soap/", Use:=SoapBindingUse.Literal, ParameterStyle:=SoapParameterStyle.Wrapped)> _
Public Function UpdateContentTypeXmlDocument ( _
    listName As String, _
    contentTypeId As String, _
    newDocument As XmlNode _
) As XmlNode

Dim instance As Lists
Dim listName As String
Dim contentTypeId As String
Dim newDocument As XmlNode
Dim returnValue As XmlNode

returnValue = instance.UpdateContentTypeXmlDocument(listName, contentTypeId, newDocument)
[SoapDocumentMethodAttribute("http://schemas.microsoft.com/sharepoint/soap/UpdateContentTypeXmlDocument", RequestNamespace="http://schemas.microsoft.com/sharepoint/soap/", ResponseNamespace="http://schemas.microsoft.com/sharepoint/soap/", Use=SoapBindingUse.Literal, ParameterStyle=SoapParameterStyle.Wrapped)] 
public XmlNode UpdateContentTypeXmlDocument (
    string listName,
    string contentTypeId,
    XmlNode newDocument
)

Parameters

  • listName
    A string that represents the name of the list.
  • contentTypeId
    A string that represents the content type ID of the content type to which to add or update the XMLDocument element.
  • newDocument
    A string representing the XML document to replace the existing XML document.

Return Value

A string, in the following format, indicating that the method succeeded.

<Success xmlns="http://schemas.microsoft.com/sharepoint/soap/"/>

Remarks

Windows SharePoint Services identifies the XML document to overwrite in the content type by matching the URI of the XML document passed in the newDocument parameter.

If the XML document does not exist in the content type, Windows SharePoint Services adds it to the content type.

You can use XMLDocument elements to store custom information in content type definitions. For more information, see Custom Information in Content Types.

See Also

Reference

Lists Class
Lists Members
Lists Web Service

Other Resources

Content Types
Content Type IDs