xml字符串cc.xml内容如下
<?xml version="1.0" encoding="GBK"?><tree id="1"><item text="d的" id="0" child="1" /></tree>
采用
tree=new dhtmlXTreeObject("doctree_box","100%","100%",1);
 tree.setXMLAutoLoading("cc.xml");

            tree.loadXML("cc.xml");
提示
Errot type:LoadXML  
Description:Incorrect XML  Error type:DataStructure  
Description:Xml reffers to not existing parent  
请大家帮忙解决一下。

解决方案 »

  1.   

    tree.loadXML("cc.xml");
    loadXML() 方法用于加载字符串(文本),load() 用于加载文件。
    load("***.xml")这是加载xml文件,不过需要xml对象来加载
      

  2.   

    ps:loadXML() 方法用于加载xml格式的字符串,格式不对也报错
      

  3.   

    dhtmlxtree必须指定树的根节点ID,默认的根节点ID是0,所以你的树根节点ID和数据的根节点Id必须对应。根节点Id因该时可以设置的~