471,627 Members | 1,571 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

XML and Dataset

GTi
I have a result from webservice query:

XmlDocument doc = new XmlDocument();
XmlNode newSet = doc.ImportNode( [xmlnode from a WebService query] );
doc.DocumentElement.AppendChild(newSet);

I have the same database on my computer.
The problem is that this database don't have any primary keys.
Is there anyway I can load local database into a dataset and the
webservice into a dataset
and compare it and save the new changed dataset back to my local
computer ?

DataSet ds1 = new DataSet();
DataSet ds2 = new DataSet();

ds1 = [load dataset from local computer]
ds2 = doc.????? [get the xml to a DataSet]

ds1.Merge(ds2);

Save changes to local database.

Question Summary:
1) How to load a XmlDocument into a dataset
2) Is it possible to check any changes in this two dataset?

Jan 23 '06 #1
2 1158
GTi
Maybe I don't need to insert it into a DataSet...
I can use the xml directly and manualy step thru the records and see if
there is any changes. If it can't be done with .NET 2.0
But is there a way of sorting the xml records?

Jan 23 '06 #2
the dataset might be a good way if you know the structure of your xml
well enough.

the dataset has a method to diretly load an xml file in it (LoadXml() i
guess)

greetz,
Rudderius

GTi wrote:
Maybe I don't need to insert it into a DataSet...
I can use the xml directly and manualy step thru the records and see if
there is any changes. If it can't be done with .NET 2.0
But is there a way of sorting the xml records?

Jan 24 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Jeronimo Bertran | last post: by
5 posts views Thread by Mike | last post: by
3 posts views Thread by JJ | last post: by
5 posts views Thread by Jason | last post: by
2 posts views Thread by John Holmes | last post: by
15 posts views Thread by JIM.H. | last post: by
16 posts views Thread by Geoff Jones | last post: by
22 posts views Thread by Arne | last post: by
1 post views Thread by XIAOLAOHU | last post: by

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.