Click here to Skip to main content
15,885,096 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi guys,

When I am using dataset.writexml() method its create like:
HTML
<NewDataSet>
<Table>
<Row>1</Row>
<URN>00004542220202703</URN>
<hospitalname>NANAVATI</hospitalname>
</Table>
</NewDataSet>


but i need in following format
HTML
<urndata>
<row>
<URN>00004542220202703</URN>
<hospitalname>NANAVATI</hospitalname>
</row>
<row>
.........
</row>
<row>
.........
</row>
</urndata>


Please help me. Thank you in advance!!
Posted
Updated 11-Jan-12 5:17am
v2

1 solution

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.
 
Share this answer
 
Comments
fjdiewornncalwe 11-Jan-12 11:48am    
+5. Of course.
Wendelius 11-Jan-12 11:51am    
Thanks :)
Espen Harlinn 22-Jan-12 17:14pm    
5'ed :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900