Categories | Question details Back To List | ||
dhtmlxTree not autoloading from xml I'm getting the "Incorrect XML" and then the "XML reffers to not existing parent" error messages when loading an xml in my program. I'm getting the same error message in the sample documentation code (so I don't think it's my xml). And my xml opens in IE just fine with no errors. My xml: <?xml version="1.0" encoding="iso-8859-1" ?> <tree id="0"> <item id="fcb2299f_de82a749_5rtfg" text="2008 D5432" child="0" im0="img/legend/p.jpg" im1="img/legend/l.jpg" im2="img/legend/k.jpg"> <userdata name="system">true</userdata> </item> ...(lots of items) </tree> My code: <div id="treeBox" style="width:200px; height:500px;"></div> <script> tree=new dhtmlXTreeObject(document.getElementById('treeBox'), "100%", "100%", 0); tree.setImagePath("inc/tree/imgs/"); tree.setXMLAutoLoading("tree.aspx"); tree.loadXML("tree.aspx"); </script> I'm coding on a machine that doesn't have internet access, using IE7, and does not have flash or activeX. The initial error ("Incorrect XML") is occuring in the dhtmlxcommon.js file: dtmlSMLLoaderObject.prototype.getXMLTopNode = function(tagName, oldObj) { ...}; A comment in this part of the js file says "fall back to MS.XMLDOM" Any suggestions would be really helpful! Thanks, Kerri Answer posted by Support on May 22, 2009 02:34 Please be sure that you are loading html page by http like URL ( http://some/some.html not the c:/some/some.html ) IE has known issues with loading XML, when page loaded directly from file system. ( loader code solves such problem automatically for utf-encoded data , but it doesn't work for other encodings ) Answer posted on May 22, 2009 09:40 Answer posted by kerri on May 22, 2009 09:43 Then why doesn't the sample code work? I'm getting the same error running the downloaded documentation and trying to view the sample auto load from xml. I also forgot to mention that my OS is Vista Business. Answer posted by Support on May 22, 2009 10:02 Please try to use debug version of dhtmlxcommon.js instead of original one Can be taken from next post - http://dhtmlx.com/docs/products/kb/index.shtml?cat=search&q=2545&ssr=yes&s=dhtmlxcommon It will show exact reason of error Please beware that some samples require server side support ( PHP ) and require php capable web server to work correctly. |