将组件保存在xml文件中 [英] saving component in xml file

查看:93
本文介绍了将组件保存在xml文件中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我确实将表单保存在xml文件中,并且表单具有组件.
怎么办呢?如何将我的组件保存在xml文件中?
请帮助我.

I do save my form in xml file and my form has component.
how can do this? how can save my component in xml file?
please help me.

推荐答案

您的问题不是很清楚.首先看一下下面的链接,以了解" XML ".

http://www.w3schools.com/xml/

如果您的组件/API返回XML输出,并且您想将其保存到某个文件,请查看下面的链接.

http://msdn.microsoft.com/en-us/library/dw229a22.aspx
Your question is not very clear. First have a look at below link to understand "XML".

http://www.w3schools.com/xml/

If your Component/API is returning XML output and you want to save it to some file, then have a look at below links.

http://msdn.microsoft.com/en-us/library/dw229a22.aspx


第一个建议是:不要保存任何组件.进行一级间接.创建一个纯数据模型,仅存储和加载/恢复数据模型,然后使用该数据模型填充其他任何东西并进行更新.

使用数据合约以非侵入性和通用的方式持久存储任何数据的最佳方法是具有最大的灵活性和出色的向后兼容性,请参见:如何在我的表单应用程序? [ ^ ],
创建属性文件... [
First advice is: don''t save any components. Make one level of indirection. Create a pure data model, store and load/restore just the data model, and use the data model to populate and be updated by anything else.

The best way to persist any data in non-intrusive and universal way, with maximum flexibility and great provision for backward compatibility is using Data Contract, see: http://msdn.microsoft.com/en-us/library/ms733127.aspx[^].

See also my past solutions:
How can I utilize XML File streamwriter and reader in my form application?[^],
Creating property files...[^].

—SA


这篇关于将组件保存在xml文件中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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