本文介绍了Treeview和XML的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 我正在尝试使用XML文件实现Treeview,我甚至从MSDN复制了 粘贴的示例,但无法让它们工作。任何建议 欢迎。 XML文件 < TREENODES> < TREENODE TEXT =" Document-1"> < TREENODE TEXT =" Folder-1" EXPANDED =" true"> < TREENODE TEXT =" Document-2" /> < TREENODE TEXT =" Document-3" /> < / TREENODE> < TREENODE TEXT =" Document-4"> < / TREENODES> 控制源 < iewc:TreeView id =" TreeView1" style =" Z-INDEX:102;左:168px; 位置:绝对; TOP:120px runat =" server" TREENODESRC =" NavigateTree.xml">< / iewc:TreeView> 错误 '/ Manager''应用程序中的服务器错误。 ------------------------- ----------------------------------------------- -------- 根级别的数据无效。第1行,第1位。 描述:在执行 当前Web请求期间发生了未处理的异常。请查看堆栈跟踪以获取更多信息 有关错误及其在代码中的起源。 异常详细信息:System.Xml.XmlException:数据在根级别 无效。第1行,第1位。 Evan Kontos | EK*****@comtekcadd.com 27 Whitehall St. | 3楼|纽约,纽约10004 电话212.480.8166 |传真212.480.8167 |个人传真786.513.0295 www.comtekcadd.com ***通过开发人员指南 http://www.developersdex.com *** 不要只是参加USENET ......获得奖励! I am trying to implement a Treeview w/an XML file and I even copied andpasted examples from MSDN but can''t get them to work. Any suggestionswelcome. XML File <TREENODES><TREENODE TEXT="Document-1"><TREENODE TEXT="Folder-1" EXPANDED="true"><TREENODE TEXT="Document-2" /><TREENODE TEXT="Document-3" /></TREENODE><TREENODE TEXT="Document-4"></TREENODES>Control Source <iewc:TreeView id="TreeView1" style="Z-INDEX: 102; LEFT: 168px;POSITION: absolute; TOP: 120px" runat="server"TREENODESRC="NavigateTree.xml"></iewc:TreeView> Error Server Error in ''/Manager'' Application.-------------------------------------------------------------------------------- The data at the root level is invalid. Line 1, position 1.Description: An unhandled exception occurred during the execution of thecurrent web request. Please review the stack trace for more informationabout the error and where it originated in the code. Exception Details: System.Xml.XmlException: The data at the root levelis invalid. Line 1, position 1. Evan Kontos | EK*****@comtekcadd.com 27 Whitehall St. | 3rd Floor | New York, NY 10004Tel 212.480.8166 | Fax 212.480.8167 | Personal Fax 786.513.0295 www.comtekcadd.com *** Sent via Developersdex http://www.developersdex.com ***Don''t just participate in USENET...get rewarded for it!推荐答案 这篇关于Treeview和XML的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
10-16 23:47