首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > Java Web开发 >

dhtmltree采取生成好的字符串加载生成树?无法正确加载xml字符串

2012-12-15 
dhtmltree采用生成好的字符串加载生成树?无法正确加载xml字符串?xml字符串ss内容如下?xml version1.0

dhtmltree采用生成好的字符串加载生成树?无法正确加载xml字符串?
xml字符串ss内容如下
<?xml version="1.0" encoding="iso-8859-1"?>
<tree id="0" >
<item   text="Books" id="books" im0="book.gif" im1="books_open.gif" im2="books_close.gif" child="1">
<item text="Mystery &amp; Thrillers" id="mystery" im0="folderClosed.gif" im1="folderOpen.gif" im2="folderClosed.gif" child="1">
</item>
</item>
</tree>
采用
tree=new dhtmlXTreeObject("doctree_box","100%","100%",1);
tree.setImagePath("<%=request.getContextPath()%>/imgs/"); 
 tree.loadXML(ss);
提示
Errot type:LoadXML 
Description:Incorrect XML 

Error type:DataStructure 
Description:Xml reffers to not existing parent 


请大家帮忙解决一下。
[解决办法]
tree Id 和你创建树的Id不同 ,你的 tree ID是0,创建 treeObjectId 为 1

[解决办法]
你的问题解决了吗?我也遇到了同样的问题
[解决办法]
我也遇到了这个问题,你解决了希望能够将方法说下啦~~~

热点排行