在MVC中实现从大型XML文件到树结构的嵌套层次结构 [英] Implementing nested hierarchy from large XML file to tree structure in MVC
问题描述
我正在尝试从大型XML文件中获取嵌套的层次结构数据,并在MVC应用程序的树形结构中显示它。
我需要考虑性能问题好吧,因为我正在使用一个大的xml文件。
我开始用XmlReader解析xml,现在我想使用XmlSerializer,你怎么看?
如果当我添加/删除节点时,xml文件中的层次结构将会发生变化,如何构建XmlSerializer将识别所有子节点的xml文件?
最后我需要在浏览器树中显示扩展和折叠功能,每次都从我的xml中获取扩展节点...
谢谢!
I'm trying to get nested hierarchy data from large XML file and show it in a tree structure in MVC application.
I need to considerate performance issue as well, because I'm using a large xml file.
I started with parsing the xml with XmlReader and now i thinking to use XmlSerializer, what do you think?
If the hierarchy in the xml file will be changing when i will add / remove nodes, how to build the xml file that the XmlSerializerwill recognize all the children?
in the end i need to show in the browser tree with expand and collapse ability, and each time to get the expanded nodes from my xml...
Thanks!
推荐答案
查看mvc树视图的链接
如何在MVC3中创建TreeView [ ^ ]
i认为它会对你有所帮助。
^ ]
view this link for mvc tree view
How to Create TreeView in MVC3[^]
i think it will help you.
Build a custom MVC Tree Control by using jsTree[^]
这篇关于在MVC中实现从大型XML文件到树结构的嵌套层次结构的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!