Programmatically Read List & View Content in SharePoint

I got a task to work on developing the windows application which will fetch the List View data from sharepoint and process the data in win forms app.

Previously i used to fetch the data using Lists.asmx,views.asmx.

Now i came to know there is other way to fetch the data from List View.

Syntax:{list Id}&View={View Id}&XMLDATA=true

Example URL:{EA1BD05B%2DDB5B%2D434B%2DB2FC%2DB9AB9EE18A91}&View={B959F555%2D798B%2D4F47%2D9FBB%2D81513B85F906}&XMLDATA=true

Now it will give the xml data as response.

write the response to xmldoc and process the data.

HttpWebRequest myRequest = (HttpWebRequest)WebRequest.Create(“{EA1BD05B%2DDB5B%2D434B%2DB2FC%2DB9AB9EE18A91}&View={B959F555%2D798B%2D4F47%2D9FBB%2D81513B85F906}&XMLDATA=true”);

myRequest.Credentials =
HttpWebResponse response = (HttpWebResponse)myRequest.GetResponse();
XmlDocument doc = new XmlDocument();

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>