如何将XML文件解析为RTF文本块,然后将其绑定到RTF文本框控件? [英] How do I parse an XML file into an RTF Text block and then bind it to an RTF Text Box control?

查看:234
本文介绍了如何将XML文件解析为RTF文本块,然后将其绑定到RTF文本框控件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我正在尝试使用C#将XML文件转换为RTF文本块,然后将该RTF文本块应用于Windows窗体上的RTF文本框.

你们有快速的方法吗?最好使用Linq到XML,因为这就是我构建XML文件的方式.

非常感谢.

Hi,

I''m trying to convert an XML file into an RTF text block using C# and then apply that RTF text block into an RTF Text Box on a Windows Form.

Do you guys have a quick way to do this? Preferrably using Linq to XML as that is how I built the XML file.

Thanks very much.

推荐答案



构建自己的XML解析器.

让它接收XML标记/正文等,然后剥离所需的内容.

将内容作为文本传递到rtf.
Hi,

Build your own XML Parser.

Let it receive the XML tags / body etc. and strip the content you want.

Pass the content to rtf as text.


这篇关于如何将XML文件解析为RTF文本块,然后将其绑定到RTF文本框控件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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