Hi I’m trying to import an xml file into my app from a directory within my application code, to use as reference data, is there a ‘best practice’ way of doing this? My end goal is to pre populate a application specific database with the xml data.
I searching for the same answer, i receive xml from a webservice and need to converto to JSON, can cordova file do this task ? or what is the best way ?
But keep in mind xml code can contain characters or structurs which would be invalid in json so the converting can fail!
So the best solution is to extend the API to return also JSON-Data if you want.
Nowadays nobody would build a xml-API for Web-/ Mobile-Apps.