Hi Tino Kreutzer,
I am having problems importing XML data to existing form in https://kc.kobotoolbox.org.
Am able to import CSV data to exixsting form using below code:
var client = new RestClient("https://kc.kobotoolbox.org/api/v1/forms/{pk}/csv_import");
client.Authenticator = new HttpBasicAuthenticator("user_name", "password");
client.AddDefaultUrlSegment("pk", "35545");
string file_path = Server.MapPath("~/form1.csv");
var request = new RestRequest(Method.POST);
request.AddFile("csv_file", file_path);
IRestResponse response = client.Execute(request);
I want to achieve the save results but using XML instead of CSV.
When I tried to download data from https://kc.kobotoolbox.org I couldn't find XML option but XLS,CSV,ZIP,KML and Excel Analyser only. So its hard for me to get the correct format needed to import XML data.
1. Please provide for the the correct xml format needed to import data from xml to existing form
2. Please using the above code, edit it where necessary so that i could reuse it to import xml instead of csv.
For simplicity, I have attached a sample CSV data that you can use to come up with XML format.
Thanks in advance.
Jose