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