please check this uploaded small web project for testing.
Put it on a java app server and open the dataStoreTest.html and I see alert(1). no 2 and 3.
if I comment out the line:
timeBlockDataStore = new dhtmlXDataStore({url:“timeBlockList.xml”, datatype:“xml”, ready:checkData});
I can see alert 1 and 3 which means this line is not working and I can’t any value from the datastore.
many thanks.
and here is the jar file attached.
dhtmlxTest.rar (410 KB)
forget the previous because I missed datastore.js.
check this please. now matter how to new the dhtmlxdatastore or load. still no data feed in.
dtmlxTest.rar (423 KB)
Change format of XML like next
<?xml version="1.0" encoding="UTF-8"?>
<data>
<item id="1"><name><![CDATA[xxx]]></name><index><![CDATA[1]]></index></item>
<item id="2"><name><![CDATA[yyy]]></name><index><![CDATA[2]]></index></item>
<item id="3"><name><![CDATA[zzz]]></name><index><![CDATA[3]]></index></item>
</data>
- rows => data
- row => item
- remove subtag id which is the same as id attribute
this is the document about the datastore for the xml data type:
docs.dhtmlx.com/doku.php?id=dhtm … _templates
it is said that: Tags of the top and second level can have any name.
So it is a bug.
They can, but you need to configure datastore in such case.
You can use the original xml, and js code like next
[code]
dhx.DataDriver.xml.records = “/*/row”;
timeBlockDataStore = new dhtmlXDataStore({url:“timeBlockList.xml”, datatype:“xml”, ready:checkData});[/code]
Duplication of ID ( having it as attribute and as sub tag in the same time ) need to fixed anyway.