would it be possible to load a grid from a INLINE xml object?
The grid has possibility to load from XML string
grid.loadXMLString(" xml as text here ")
And, in case of IE, from XML object embeded in page ( xml island)
grid.parseXML(‘id_of_xml_island’);
Given the size of the grid (3000 rows or more), it would not fit in a Javascript string which is limited to 64k (unless you know a way to make a javascript string up to 1Mb !!)
Why is not the xml island available with Firefox? That is exactly what we need. Do it and I will by an “Pro” version of dHtmlXGrid immediately!
it would not fit in a Javascript string which is limited to 64k
This is limit to js command line , not the string limit. String itself can contain more than 1Mb of data for sure.
You can use next approach
… xml of any length here…
grid.loadXMLString(document.getElementById(‘for_xml’).value);
>>Why is not the xml island available with Firefox?
I think this is question for FF developers
In case of FF , when document with HTML doctype parsed , unknown tags, such as will be ignored and not included in DOM model
There is no technical problem to use grid.parseXML with any browser, but only IE ( and Safari partially ) allow to embed XML document inside HTML page
Sorry, Firefox allows embedding xml into a html document (e.g. a data island, a svg , etc…). I have 6000 documents of that kind properly displaying with Firefox.
The bug is in your code and I have found it !!!. Send me an email ( dvanesse@namsa.nato.int ) and agree to give me a “Enterprise” license for free and you will get the solution
FireFox can handle XML tag inside HTML content but it use HTML parser against it, in result the data is not usable ( the xpaths used in case of normal xml returns empty result sets in case of XML island in FF )
The code of parseXML really written in the way, which not allow to use XML Islands in FF, but it doesn’t matter because even if XML Island objects correctly detected it still not usable.
Here is a very simple example of an inline xml data island properly managed with Firefox + XPath.
Copy the code below to something.html and open it with Firefox.
Test XML data island
-1500
A Time to Kill
John Grisham
12.99
1
24
0
05/01/1998
1000
Blood and Smoke
Stephen King
0
1
24
0
01/01/2000
-200
The Rainmaker
John Grisham
7.99
0
48
0
12/01/2001
350
The Green Mile
Stephen King
11.10
1
24
0
01/01/1992
700
Misery
Stephen King
7.70
0
na
0
01/01/2003
-1200
The Dark Half
Stephen King
0
0
48
0
10/30/1999
1500
The Partner
John Grisham
12.99
1
48
1
01/01/2005
500
It
Stephen King
9.70
0
na
0
10/15/2001
400
Cousin Bette
Honore de Balzac
0
1
1
0
12/01/1991
Enter a number (1 to 9) to select the corresponding xml element ‘attr’ attribute
Enter an xpath expression to select the corresponding xml elements
It seem’s that I was wrong.
The XML Island can be used in FF - but still with limitation, all tags which have not equals work fine, but in case of configuration from XML we have
The //rows/head XPath failed (most probably because head parsed by HTML tag rules)
Updated dhtmlxgrid.js , which works ( mainly ) with XML Islands in FF and Opera - attached to post
This is standard version, if you need a PRO version - just contact at support@dhtmlx.com
updated_js.zip (42 KB)
sample_of_usage.zip (88.1 KB)
Congratulation, you have found it! Indeed, the problem came from the “head” tag which is recognized as part of the default namespace ( html in our case)
Thanks for the update, I will test that next week.
The sample of usage you provided as an attachment to this thread seems to be corrupt. Can you resubmit, please?
Thanks,
Larry
The attachment is not the sample. It contains only two js files.
Please have a look at the sample in the grid package dhtmlxGrid/samples/initialization_loading/init_grid_xml.html
dhtmlx.com/docs/products/dhtmlxG … d_xml.html
This sample demonstrates loading data from xml stream generated using PHP, from xml string and xml island. Probably it will help.