如何创建xml标签 [英] How to create xml tag

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

问题描述

大家好,

当我使用dataset.writexml()方法时,其创建方式如下:

Hi guys,

When I am using dataset.writexml() method its create like:

<NewDataSet>
<Table>
<Row>1</Row>
<URN>00004542220202703</URN>
<hospitalname>NANAVATI</hospitalname>
</Table>
</NewDataSet>



但我需要以下格式



but i need in following format

<urndata>
<row>
<URN>00004542220202703</URN>
<hospitalname>NANAVATI</hospitalname>
</row>
<row>
.........
</row>
<row>
.........
</row>
</urndata>



请帮我.预先谢谢您!



Please help me. Thank you in advance!!

推荐答案

据我所知,没有太多选择来控制如何使用WriteXML方法编写xml.此方法的目的是创建一个可以使用ReadXML方法读取的XML文件.

如果要使用特定格式,则应使用例如 XmlWriter [ ^ ]并写入以下内容数据设置为所需的格式.
As far as I know there''s not much options to control how the xml is written using WriteXML method. The purpose of this method is to create an XML file that can be read using ReadXML method.

If you want a specific format, you should use for example XmlWriter[^] and write the contents of the data set to the format you want.


这篇关于如何创建xml标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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