I would like to convert a dataset into Project Open Data data.xml format so that I can ingest in via the DKAN harvester. I know there is data.json format but prefer to use data.xml as the data is already XML and I am comfortable transforming it.
I can't seem to find where the data.xml schema/format is defined and would be grateful for pointers.
The data.json file is created by implementing the Open Data Schema Map module in DKAN.
You have a couple of options:
You can do the same thing in code using hook hook_open_data_schema_apis_defaults() that Open Data Schema Map DKAN uses. Copy the declaration for "data_json" in your own module and change the endpoint to "'endpoint' => 'data.xml'," and the format to xml.
You could use hook_open_data_schema_map_results_alter to alter the schema to use "data.xml" and format to XML in a custom module.