用流编写器写xml? [英] write xml using stream writer?

查看:51
本文介绍了用流编写器写xml?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



有没有人知道如何在vb中使用流编写器生成xml文件???

该元素应如下所示:

hi
do any one have idea how to produce xml file using stream writer in vb ???
the element should look like :

<New_Dot>
    <X_coordinate>209</X_coordinate>
    <Y_coordinate>99</Y_coordinate>
    <layer>0</layer>
  </New_Dot>

推荐答案

使用StreamWriter编写 XML 非常简单:您可以直接使用其写入方法,例如
Writing XML with a StreamWriter is really simple: you may use directly its write methods, e.g.
sw.WriteLine("<new_dot>");</new_dot>



请参阅如何:写文本到文件 [ ^ ](请记住, XML 文件文本文件)。


See "How to: Write Text to a File"[^] (remember, XML files are text files).


这篇关于用流编写器写xml?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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