如何在C sharp中添加XML TAG [英] how to Add XML TAG in C sharp
本文介绍了如何在C sharp中添加XML TAG的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有Xml结构如下
< root >
< OutBound >
< RowId > 0 < / RowId >
< RefId > 0 < / RefId >
< RefNum > S2-0 < / RefNum >
< AirlineId / >
< Origin > BLR < / Origin >
< 目的地 > BOM < /目的地 >
< FlightName > S2 < / FlightName >
< span class =code-keyword>< FlightNumber > 3120 < / FlightNumber >
< span class =code-keyword>< OrgCityName > 班加罗尔< / OrgCityName >
< span class =code-keyword>< DesCityName > 孟买< / DesCityName >
< span class =code-keyword>< 组织 > BLR < / Org >
< / OutBound >
敬请建议如何在C中将''<''/ Root''>''标记添加到XML中#
在此先感谢
Sheethal
解决方案
XML文档必须包含一个元素,它是所有其他元素的父元素。此元素称为根元素。
例如语法:
< root >
< child >
< subchild > ..... < / subchild >
< / child >
< / root >
您好,< br $> b $ b
看看这篇文章:
使用XML [ ^ ]
C#中的简单XML解析 [ ^ ]
LINQ to XML [ ^ ]
用C#读写XML [ ^ ]
C# XmlWriter [ ^ ]
Hi,
I Have Xml Structure as below
<root>
<OutBound>
<RowId>0</RowId>
<RefId>0</RefId>
<RefNum>S2-0</RefNum>
<AirlineId />
<Origin>BLR</Origin>
<Destination>BOM</Destination>
<FlightName>S2</FlightName>
<FlightNumber>3120</FlightNumber>
<OrgCityName>Bangalore</OrgCityName>
<DesCityName>Mumbai</DesCityName>
<Org>BLR</Org>
</OutBound>
Kindly suggest how To add ''<'' /Root''>'' Tag into the XML in C#
Thanks in Advance
Sheethal
解决方案
XML documents must contain one element that is the parent of all other elements. This element is called the root element.
for example syntax:
<root> <child> <subchild>.....</subchild> </child> </root>
for more help in syntax refer here[^]
Root Node[^]
and these tutorial on XML in C#[^] will help you
Hi,
Have a look at this articles:
Working with XML[^]
Easy XML Parsing in C#[^]
LINQ to XML[^]
Reading and Writing XML in C#[^]
C# XmlWriter[^]
这篇关于如何在C sharp中添加XML TAG的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文