title: SharePoint REST API: How to download List XML visible in browser to temp file C#
body: <p>I have been looking at exporting data from a company SharePoint site using C# written in VS Express 2013. First, a caveat - I'm new to web based APIs (Soap or REST) and SharePoint, so apologies if my question is prosaically easy to answer/ badly worded. Pretty much all of my previous work has been with files local to the machine or on a similarly local company network that can be accessed in the same way.</p>
  
  <p>My aim - download a list from one site, do stuff to it on the client machine and then re-upload it to a different SharePoint site.</p>
  
  <p>I have tried using the Soap API (Client object model) but I am encountering a variety of access and permissions issues. So I switched to the REST API, and have now managed to get the list data into XML within my browser. But I don't really want it in my browser - I want to access it programmatically, and write selected data from the list into a local file (using <code>System.IO.Path.GetTempPath()</code> to find the temporary folder), without browser windows popping up (except to allow the user to log in to establish an authorized context with the server). There has to be some trivially easy way of saving the XML data to my temporary file without needing a browser open, but I haven't been able to find it.</p>
  
  <p>My REST query is like the following:</p>
  
  <p><a href="https://sk.someSharePointSite/sites/subsection/_vti_bin/ListData.svc/AList" rel="nofollow">https://sk.someSharePointSite/sites/subsection/_vti_bin/ListData.svc/AList</a></p>