XML文件是否比在WPF下存储树项目的其他方法更好? [英] Is XML file better than other ways to store tree items under WPF?

查看:73
本文介绍了XML文件是否比在WPF下存储树项目的其他方法更好?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好

好的!实际上,我有一些信息项必须从文件中读取/写入,并且我不确定XML文件是完成此工作的最佳方法(性能,简单性等)!

您可以为此目的指导我吗?

在此先感谢.

解决方案

XML是绝对可行的方法,另一种可能是将信息存储在txt文件中,如下所示:
.Node1
..SubNode
... SubSubNOd
.Node2
..SubNode
... SubSubNOd

等..

这实际上是挪威数字地图的存储方式(称为SOSI: http://www.statkart .no/standard/sosi/html_32/del1_2/del1_2.htm [ http://support.microsoft.com/kb/317597 [ http://social.msdn.microsoft.com /forums/zh-CN/xmlandnetfx/thread/6847e53a-b0cf-4238-9b01-c63e79eb4853/ [将TreeView控件加载并保存到XML文件使用XmlTextWriter和XmlTextReader [ ^ ]

将TreeView保存到XML文件 [ ^ ]

Hi guys

Okay! In fact, I have some information item that must read/write from file and I don''t sure XML file is best way to this job (of performance, simplicity and etc)!

You can guide me for the purpose?

Thanks in advance.

解决方案

XML is definitly a way to go, another might be to store the information in a txt file as:
.Node1
..SubNode
...SubSubNOd
.Node2
..SubNode
...SubSubNOd

etc..

This is actually the way norwegin digital maps are stored (its called SOSI : http://www.statkart.no/standard/sosi/html_32/del1_2/del1_2.htm[^] its in norwegian but if you are really interested you could use google translate)

If you want to do this XML way you could look here:
http://support.microsoft.com/kb/317597[^]

http://social.msdn.microsoft.com/forums/en-US/xmlandnetfx/thread/6847e53a-b0cf-4238-9b01-c63e79eb4853/[^]

Loading and Saving a TreeView control to an XML file using XmlTextWriter and XmlTextReader[^]

Save a TreeView into an XML File[^]


这篇关于XML文件是否比在WPF下存储树项目的其他方法更好?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆