By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,339 Members | 1,688 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,339 IT Pros & Developers. It's quick & easy.

How to convert XML data of web service into DataSet

P: n/a
Hi all,....i am developing an pocket PC application which consumes
USZip Webservice and display the data.

USZip has a GetInfoByZip(String zipcode) method which retuns an XML
data......

For Example....

USZip u = new USZip();

System.Console.WriteLine(u.GetInfoByZip("49544"));

****OutPut************
<?xml version="1.0" encoding="utf-8" ?>
- <NewDataSet>
- <Table>
<CITY>Grand Rapids</CITY>
<STATE>MI</STATE>
<ZIP>49544</ZIP>
<AREA_CODE>616</AREA_CODE>
<TIME_ZONE>E</TIME_ZONE>
</Table>
</NewDataSet>
********************************
I want this data to be displayed into a dataset....i tried using
DataSet.ReadXml(u.GetInfoByZip("49544"))...but iam getting an error
saying cannot convert Xml.XMlNode data into String..may be because
ReadXml() don't hav such type of argument......can any tell me how to
convert this Xml data into DataSet..................thankyou

Jul 10 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Please do not multi post.

You have 2 answers here (where you already posted)

http://groups.google.com/group/micro...3403ab2a40be06

and here
http://groups.google.com/group/DotNe...378535db261e0d

"shakthi" <sh*******@gmail.comwrote in message
news:11**********************@g4g2000hsf.googlegro ups.com...
Hi all,....i am developing an pocket PC application which consumes
USZip Webservice and display the data.

USZip has a GetInfoByZip(String zipcode) method which retuns an XML
data......

For Example....

USZip u = new USZip();

System.Console.WriteLine(u.GetInfoByZip("49544"));

****OutPut************
<?xml version="1.0" encoding="utf-8" ?>
- <NewDataSet>
- <Table>
<CITY>Grand Rapids</CITY>
<STATE>MI</STATE>
<ZIP>49544</ZIP>
<AREA_CODE>616</AREA_CODE>
<TIME_ZONE>E</TIME_ZONE>
</Table>
</NewDataSet>
********************************
I want this data to be displayed into a dataset....i tried using
DataSet.ReadXml(u.GetInfoByZip("49544"))...but iam getting an error
saying cannot convert Xml.XMlNode data into String..may be because
ReadXml() don't hav such type of argument......can any tell me how to
convert this Xml data into DataSet..................thankyou

Jul 10 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.