You can try the below code to get customers list from business central and convert as xml in c#.
I know this is bit of late reply, but would like to answer here so some one else will get benefit. :)
string url = String.Format("https://<<your details>>/api/v1.0/companies(<<companyid>>)/customers);
HttpWebRequest requestObj = (HttpWebRequest)WebRequest.Create(url);
requestObj.Method = "Get";
requestObj.PreAuthenticate = true;
//Basic Authentication
requestObj.Credentials = new NetworkCredential(<<USERID>>, <<WEBACCESSKEY>>);
HttpWebResponse responseObj = null;
responseObj = (HttpWebResponse)requestObj.GetResponse();
string strresult = null;
using (Stream stream = responseObj.GetResponseStream())
{
StreamReader sr = new StreamReader(stream);
strresult = sr.ReadToEnd();
sr.Close();
}
//Json to XML conversion
XNode node = JsonConvert.DeserializeXNode(strresult, "Root");
XmlDocument doc = new XmlDocument();
doc.LoadXml(node.ToString());
//Save the document to a file.
doc.Save(@"C:\API\customer.xml");