473,385 Members | 1,311 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,385 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 4236


http://sholliday.spaces.live.com/Blog/cns!A68482B9628A842A!148.entry

You're lucky day!

Xml To Xml Conversion

"shakthi" <sh*******@gmail.comwrote in message
news:11**********************@o61g2000hsh.googlegr oups.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...
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.