The Method element is used in batch processing to specify commands within the Batch element.
<Method ID="Text" Cmd = "Text"> </Method>
|AddToView||Optional Text. A string containing the GUID of a list view to which to add a new field when using the UpdateList method of the Lists Web service.|
|Cmd||Optional Text. Used in Web services to specify the command to post to the server for updating list items. Possible values include the following:|
|ID||Required Text. A freeform identification string that is not actually used by the server but that is returned to the client.|
|Parent Elements||Child Elements|
|Batch||Field, SetList, SetVar|
The Method element is required for the Batch element, which is embedded within HTTP protocol and allows the client application to post more than one command at a time to the server.
In operations where the SetVar element is used within the Method element to post commands, the Cmd variable can contain methods in the Microsoft Windows SharePoint Services Remote Procedure Call (RPC) protocol.
The following example uses the Method element to post the RPC ExportList command and return the schema of a specified list.
<Batch OnError="Return"> <Method ID="0,ExportList"> <SetList Scope="Request">EF2F5A21-0FD0-4654-84ED-112B4F5A48F8</SetList> <SetVar Name="Cmd">ExportList</SetVar> </Method> </Batch>