473,406 Members | 2,619 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

How to convert XML data of web service into DataSet

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
1 4779
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: HardBap | last post by:
I've created a strongly typed DataSet (Customers.xsd) using the xsd.exe tool. I want to be able to access fields using ds.Customer.CompanyName. The problem is when I return this DataSet from a...
2
by: Ben Turner | last post by:
I'm querying a web service to get some global weather data (http://www.webservicex.net/globalweather.asmx?WSDL) which works really well, however I'm getting stuck on the returned data for the...
2
by: Simon Harris | last post by:
I have created a web service, which when I call in my browser presents the text form etc. When I click the button, I get this error: System.ArgumentException: Cannot convert to System.Int32....
3
by: Zean Smith | last post by:
I wrote an ASPX web application and a C# Classes which compiled as a seperated DLLs. In my ASPX web app. I import that DLL as Reference. How do I convert those Classes to Web Services? is it...
3
by: Steve Amey | last post by:
Hi all Is it possible to retrieve data from a Windows Service? Let's say I have a service that contains code in the OnStart method that creates a DataSet, from a client application I'm using a...
3
by: convert a Class Library to web service | last post by:
can i convert a Class Library to be share in the internet as a web service i what thet all my classes in the Class Library will be shared
5
by: manmit.walia | last post by:
Hello All, I am stuck on a conversion problem. I am trying to convert my application which is written in VB.NET to C# because the project I am working on currently is being written in C#. I tried...
5
by: needin4mation | last post by:
Hi, I have a webservice that just returns a count: public DataSet HelloWorld() { OdbcConnection conn = new OdbcConnection("DSN=xxx"); String sqlString = "select count(*) as employee from...
4
by: JIM.H. | last post by:
Hello, I am trying to write the data I got from a web service to my table in SQL Server I need to append the dataset wsDS to the dataset ds and do update. PVS.myWS.Loader load = new...
1
by: shakthi | last post by:
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.