1
votes

I am getting an SPList values as xml using the following code.

http://site1/_vti_bin/owssvr.dll?Cmd=Display&List={listGuid}&Query=*&XMLDATA=TRUE

When i pass the following caml query to Query parameter as

http://site1/_vti_bin/owssvr.dll?Cmd=Display&List={listGuid}&XMLDATA=TRUE&Query={<Where><Eq><FieldRef ID='f382e54b-461d-4f32-8043-3004c428e6eb' /><Value IncludeTimeValue='TRUE' Type='Text'>1</Value></Eq></Where>}

i am getting empty xml. Can't i use caml query in owssvr.dll service. Or what is wrong with my code

1

1 Answers

1
votes

Unfortunately, you cannot use CAML in the service. It does look like you can pull in a view though. The Query parameter takes field names separated by spaces. Check the link here:

http://msdn.microsoft.com/en-us/library/ms416599.aspx

As an alternate, you could call the GetListItems method of the lists.asmx web service. I'm not sure how you're using this data though so that may or may not be an option. The GetListItems web service method will allow you to pass CAML as a parameter to it and returns the same type of formatted results.