Categories | Question details Back To List | ||||||||||||||
loading a grid from INLINE xml? would it be possible to load a grid from a INLINE xml object? Answer posted by Support on Jan 22, 2008 06:01 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'); Answer posted by Daniel Vanesse on Jan 22, 2008 06:53 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!
Answer posted by Support on Jan 23, 2008 03:50 >> 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 <textarea id="for_xml" style="display:none"> ... xml of any length here... </textarea> <script> 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 <xml> 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 Answer posted by daniel vanesse on Jan 23, 2008 08:20 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. Answer posted by Support on Jan 24, 2008 01:32 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. Answer posted by Daniel Vanesse on Jan 24, 2008 05:21 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. <html> <body> <script> function doXpath()
</p> Answer posted by Support on Jan 24, 2008 07:23 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 <rows> <head> 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 Attachments (2)
Answer posted by Daniel Vanesse on Jan 24, 2008 08:15 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. Answer posted by Larry on Feb 12, 2009 15:15 The sample of usage you provided as an attachment to this thread seems to be corrupt. Can you resubmit, please? Thanks, Larry Answer posted by Alex (support) on Feb 13, 2009 07:04 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 http://dhtmlx.com/docs/products/dhtmlxGrid/samples/initialization_loading/init_grid_xml.html This sample demonstrates loading data from xml stream generated using PHP, from xml string and xml island. Probably it will help. |