Imaging.GetItemsXMLData Method

Returns the metadata of all items in the specified list on the current Web site.

Namespace:  [Imaging Web service]
Web service reference: http://Site/_vti_bin/Imaging.asmx

Syntax

'Declaration
<SoapDocumentMethodAttribute("https://schemas.microsoft.com/sharepoint/soap/ois/GetItemsXMLData", RequestNamespace := "https://schemas.microsoft.com/sharepoint/soap/ois/",  _
    ResponseNamespace := "https://schemas.microsoft.com/sharepoint/soap/ois/",  _
    Use := SoapBindingUse.Literal, ParameterStyle := SoapParameterStyle.Wrapped)> _
Public Function GetItemsXMLData ( _
    strListName As String, _
    strFolder As String, _
    itemFileNames As String() _
) As XmlNode
'Usage
Dim instance As Imaging
Dim strListName As String
Dim strFolder As String
Dim itemFileNames As String()
Dim returnValue As XmlNode

returnValue = instance.GetItemsXMLData(strListName, _
    strFolder, itemFileNames)
[SoapDocumentMethodAttribute("https://schemas.microsoft.com/sharepoint/soap/ois/GetItemsXMLData", RequestNamespace = "https://schemas.microsoft.com/sharepoint/soap/ois/", 
    ResponseNamespace = "https://schemas.microsoft.com/sharepoint/soap/ois/", 
    Use = SoapBindingUse.Literal, ParameterStyle = SoapParameterStyle.Wrapped)]
public XmlNode GetItemsXMLData(
    string strListName,
    string strFolder,
    string[] itemFileNames
)

Parameters

  • strListName
    Type: System.String

    The name of the list within the current Web site.

  • strFolder
    Type: System.String

    The relative path from the root of the list to the target folder.

  • itemFileNames
    Type: []

    An array of the names of the files (items) for which you need the data.

Return Value

Type: System.Xml.XmlNode
A Microsoft.SharePoint.SoapServer.SoapXml object that contains the following.

<results xmlns="https://schemas.microsoft.com/sharepoint/soap/ois/">
  <result item="filename1" lastmodified="true"/>
  <result item="filename2" found="false"/>
  .
  .
  .
</results>

Exceptions

Exception Condition
[0x1]

ListNotFound: The requested list is not found.

[0x2]

IsNotLibrary: The requested list, although found, is not a picture library.

[0x3]

ItemNotFound: The requested list item is not found.

[0x4]

FolderNotFound: The requested folder is not found.

[0x5]

InvalidArgument: One or more arguments are not valid.

[0x6]

FileExists: The file already exists, and the user does not specify the overwrite option.

Examples

The following example shows how to retrieve the metadata for an item in the folder "1" in the picture library at http://MyServer/sites/mynewsite/MyPictures/1/Red Figure2.gif.

Note

This code assumes that the site and the picture library already exist, and that you have permissions on the server. The list also should have an item named "Red Figure2.gif".

Dim imgws As New Web_Reference.Imaging()
imgws.Credentials = System.Net.CredentialCache.DefaultCredentials
imgws.Url = "http://MyServer/sites/mynewsite/_vti_bin/imaging.asmx"
Dim resdoc As New System.Xml.XmlDocument()
Dim resnode As System.Xml.XmlNode = 
    resdoc.CreateNode(System.Xml.XmlNodeType.Element, "Result", "")
Dim a(0) As String
a(0) = "Red Figure2.gif"
resnode = imgws.GetItemsXMLData("My Pictures", "1", a)
MessageBox.Show(resnode.InnerXml)
Web_Reference.Imaging imgws = new Web_Reference.Imaging();
imgws.Credentials = System.Net.CredentialCache.DefaultCredentials;
imgws.Url = "http://MyServer/sites/mynewsite/_vti_bin/imaging.asmx";
System.Xml.XmlDocument resdoc= new System.Xml.XmlDocument();
System.Xml.XmlNode resnode = 
    resdoc.CreateNode(System.Xml.XmlNodeType.Element,"Result","");
String[] a = new String[1];
a[0]="Red Figure2.gif";
resnode = imgws.GetItemsXMLData("My Pictures","1",a);
MessageBox.Show(resnode.InnerXml);

See Also

Reference

Imaging Class

Imaging Members

Imaging Web Service