Share via


Lists.UpdateContentTypesXmlDocument method

Adds or overwrites the specified XMLDocument element for all content types on the specified list.

Namespace:  WebSvcLists
Assembly:  STSSOAP (in STSSOAP.dll)

Syntax

'Declaration
<SoapDocumentMethodAttribute("https://schemas.microsoft.com/sharepoint/soap/UpdateContentTypesXmlDocument", RequestNamespace := "https://schemas.microsoft.com/sharepoint/soap/",  _
    ResponseNamespace := "https://schemas.microsoft.com/sharepoint/soap/",  _
    Use := SoapBindingUse.Literal, ParameterStyle := SoapParameterStyle.Wrapped)> _
Public Function UpdateContentTypesXmlDocument ( _
    listName As String, _
    newDocument As XmlNode _
) As XmlNode
'Usage
Dim instance As Lists
Dim listName As String
Dim newDocument As XmlNode
Dim returnValue As XmlNode

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

Parameters

  • listName
    Type: System.String

    A string that represents the name of the list.

  • newDocument
    Type: System.Xml.XmlNode

    A string representing the XML document to replace the existing XML document.

Return value

Type: System.Xml.XmlNode
A string, in the following format, indicating that the method succeeded.

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

Remarks

SharePoint Foundation 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, SharePoint Foundation 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

WebSvcLists namespace

Other resources

Content Types

Content Type IDs