如何创建基于自定义文本的文件格式 [英] How do I create a custom text based file format

查看:185
本文介绍了如何创建基于自定义文本的文件格式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前有一个用C#编写的应用程序,它会对电线下垂和张力进行一些计算。



该程序只能选择导出.doc文件,或打印到PDF。

目前,我无法将其保存为允许我更改任何数据的格式,因为它已经在Word或pdf中。



我需要一些帮助来设置中间文件格式(简单),允许编辑文件,同时保留将项目文件导出到Word或PDF的功能。



解决方案必须简单,因为该项目将是非商业性的,因此没有很多资源可用。



谢谢事先。

Hi, I currently have an application written in C#, which performs some calculations on electrical lines sag and tensions.

The program has only the option of exporting a .doc file, or printing to PDF.
As it stands, I cannot save it into a format that allows me to change any data, as it is already in Word, or pdf.

I need some help to setup an intermediary file format,(something simple) that allows editing of the file, while retaining the ability to export the project file to Word or PDF.

The solution has to be simple because the project will be non-commercial, and hence not a lot of resources are available for it.

Thank you in advance.

推荐答案

使用XML:它灵活,易于使用,甚至(相对)人类可读: http://msdn.microsoft.com/en-us/library/ms950721.aspx [ ^ ]
Use XML: it's flexible, easy to use and even (relatively) human readable: http://msdn.microsoft.com/en-us/library/ms950721.aspx[^]


除了orginalGriff的灵魂1之外,我我想说,你可以使用xsl格式化 [ ^ ]以人类可读的形式显示数据。

请参阅:将XML数据呈现为使用XSL转换和ASP.NET XML控件的HTML [ ^ ]
In addition to soultion 1 by OrginalGriff, i'd like to say, you can use xsl formatting[^] to display a data in a human-readible form.
See: Rendering XML Data as HTML using XSL Transformation and ASP.NET XML Control[^]


这篇关于如何创建基于自定义文本的文件格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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