Posted by: Red Souldier | December 2, 2009

ASP.NET: How to read XML Data String to Dataset

The output of XML String:

<?xml version="1.0" encoding="utf-8" ?> 
- <NewDataSet> 
- <Table> 
 <CONDOM>Durex</CONDOM> 
 <SIZE>XL</SIZE> 
 <QTY>123</QTY> 
 <COLOR>616</COLOR> 
 </Table> 
 </NewDataSet> 

In order to convert from XML to dataset, this is the code:

     Dim MyDS as new Dataset("Table1")     
     Dim strReader As StringReader = New StringReader(YourXmlString)
     MyDS.ReadXml(strReader)
Advertisements

Responses

  1. Hi,
    Can u plz send a code sample to read an xml string using asp.net and C#

    Any help is appreciated.

    Thanks,
    Santosh


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Categories

%d bloggers like this: