dataStore not working with xml data

I’m trying to set up your example dataStore page (02_synced_data.html) to use XML data instead of JSON.

So I changed the dhtmlxDataStore instance to:

var data = new dhtmlXDataStore({ url:"data/events.xml", datatype:"xml", scheme:{ $init:function(obj){ if (typeof obj.start_date == "string"){ obj.start_date = scheduler.templates.xml_date(obj.start_date); obj.end_date = scheduler.templates.xml_date(obj.end_date); } } } });

and no events show up.

I was told I needed to change the XML path by adding the following before setting var data:

dhx.DataDriver.xml.records = "/*/event";

This resulted in a JavaScript error: Uncaught TypeError: Cannot read property ‘xml’ of undefined.

It seems that dhx.DataDriver is undefined. But I’ve included the libraries:

Can you tell me how to properly use dataStore to load xml scheduler records?

Thanks

Hello,
I’ve checked the code, seems like DataDriver is never exported to the global dhx object (i.e. dhx.DataDriver is not defined on the page and this is expected).
As I can see, currently there is no easy way to change the xml format expected by the datastore, so one solution that is left is to change the format of xml you produce on a backend or switch to json