:: begin code sample ::
//setup the service
_service = new wsLists.Lists();
_service.Url = _siteUrl + "/_vti_bin/Lists.asmx";
_service.CookieContainer = _cookieJar;
XmlNode listItemsXml = _service.GetListItems(listName, null, null, null, null, null, null);
:: end code sample ::
:: begin XML sample ::
<listitems xmlns:s=“uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882” xmlns:dt=“uuid:C2F41010-65B3-11d1-A29F-00AA00C14882” xmlns:rs=“urn:schemas-microsoft-com:rowset” xmlns:z=“#RowsetSchema” xmlns=“http://schemas.microsoft.com/sharepoint/soap/”>
<rs:data ItemCount=“5”>
<z:row ows_Title=“Item 1” ows_ID=“1” ows_owshiddenversion=“2” ows_Created=“2008-03-19 18:03:47” />
<z:row ows_Title=“Item 2” ows_ID=“2” ows_owshiddenversion=“2” ows_Created=“2008-03-19 18:03:47” />
<z:row ows_Title=“Item 3” ows_ID=“3” ows_owshiddenversion=“2” ows_Created=“2008-03-19 18:03:47” />
<z:row ows_Title=“Item 4” ows_ID=“4” ows_owshiddenversion=“2” ows_Created=“2008-03-19 18:03:47” />
<z:row ows_Title=“Item 5” ows_ID=“5” ows_owshiddenversion=“2” ows_Created=“2008-03-19 18:03:47” />
</rs:data>
</listitems>
:: end XML sample ::
Future blog(s):
- Using data returned from a SharePoint list.
1 comment:
Sounds to me like the object/collection deserialization is the way to go. The framework becomes more flexible & less complex in the long run since you are not writing heaps of different XPath queries.
Post a Comment