开发者

Dataset XML question

In VB.NET when I use the WriteXML of DataSet, can I customize it? That is to say;

I want to make a structure like this:

<products&开发者_JAVA技巧gt;
<product id="" title="">
<product id="" title="">
<product id="" title="">
</products>

How can I do? Thanks..


you can use DataSet.GetXml Method and ColumnMapping accordingly

Dim column As DataColumn
For Each column In ds.Tables.Item(0).Columns
    column.ColumnMapping = MappingType.Attribute
Next
Dim xml As String = ds.GetXml()
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜