473,808 Members | 2,851 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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(St ring zipcode) method which retuns an XML
data......

For Example....

USZip u = new USZip();

System.Console. WriteLine(u.Get InfoByZip("4954 4"));

****OutPut***** *******
<?xml version="1.0" encoding="utf-8" ?>
- <NewDataSet>
- <Table>
<CITY>Grand Rapids</CITY>
<STATE>MI</STATE>
<ZIP>49544</ZIP>
<AREA_CODE>61 6</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"))...bu t iam getting an error
saying cannot convert Xml.XMlNode data into String..may be because
ReadXml() don't hav such type of argument......c an any tell me how to
convert this Xml data into DataSet........ ..........thank you

Jul 10 '07 #1
1 4805
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*******@gmai l.comwrote in message
news:11******** **************@ g4g2000hsf.goog legroups.com...
Hi all,....i am developing an pocket PC application which consumes
USZip Webservice and display the data.

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

For Example....

USZip u = new USZip();

System.Console. WriteLine(u.Get InfoByZip("4954 4"));

****OutPut***** *******
<?xml version="1.0" encoding="utf-8" ?>
- <NewDataSet>
- <Table>
<CITY>Grand Rapids</CITY>
<STATE>MI</STATE>
<ZIP>49544</ZIP>
<AREA_CODE>61 6</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"))...bu t iam getting an error
saying cannot convert Xml.XMlNode data into String..may be because
ReadXml() don't hav such type of argument......c an any tell me how to
convert this Xml data into DataSet........ ..........thank you

Jul 10 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2184
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 Web Service it adds another Table to the DataSet that contains the data. I have to access the data using ds.Tables.Rows.ToString(). This defeats the whole purpose of using a strongly typed DataSet. Thanks in advance for the help.
2
2052
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 GetWeather call. The data returned is presented as a string but actually contains XML data. I'd like to treat the data as XML, and then save it to a file, append other results etc. so I can re-use the data later without having to requery the server (to...
2
10918
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. Parameter name: type ---> System.FormatException: Input string was not in a correct format. at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) at System.String.System.IConvertible.ToInt32(IFormatProvider provider)
3
3628
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 easy? so that other ASPX web app can reuse my classes over the network. Is this possible? or do I have to rewrite the classes? Thanks a lot
3
4799
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 ServiceController to check that the Service on the specified machine is running, can I get the DataSet that is held within the Service? Is it possible to create Properties or have a function that returns the DataSet? Kind Regards,
3
3563
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
2729
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 my best to convert it, but somehow the app does not work. I am also not getting any errors when I complie thus, letting me know I am on the write track. Basically what I want to do is edit,add,delete, and update an XML file in a DataGrid. Below...
5
6850
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 employees"; DataSet myResults = new DataSet(); OdbcDataAdapter myAdapter = new OdbcAdapter(sqlString, conn); myAdapter.Fill(myResults); return myResults;
4
2488
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 PVS.myWS.Loader(); DataSet wsDS=load.WsLoad(); dataGrid1.DataSource=wsDS; string strConn = ConfigurationSettings.AppSettings;
1
4274
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 Example.... USZip u = new USZip();
0
9600
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10631
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10374
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10114
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9196
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6880
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5548
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5686
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4331
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.