Solved

what is the best way to read a dataset.getXml() string into another dataset object?

Posted on 2006-11-07
2
372 Views
Last Modified: 2012-06-22
what is the best way to read a dataset.getXml() string into another dataset object?
0
Comment
Question by:joshuadavidlee
2 Comments
 
LVL 5

Assisted Solution

by:prajapati84
prajapati84 earned 100 total points
ID: 17896006
You can use for serialization and deseralization. Actually first write urDataset to a stringwriter and then read this stringwriter using stringreader and then read this string reader using Dataset.ReadXml method. So, finally you can readxml into other dataset.

' Serialization
Dim sw As New System.IO.StringWriter
ds1.WriteXml(sw)
Dim mystring As String = sw.tostring

'Deserialization
Dim sr As New System.IO.StringReader(mystring)
Dim ds2 As New DataSet
ds2.ReadXml(sr)

Regards,
Mukesh
0
 
LVL 3

Accepted Solution

by:
rugu_16 earned 400 total points
ID: 17899853
this should work just fine

            string s = ds.GetXml();
            System.IO.StringReader r = new System.IO.StringReader(s);
            dataset.ReadXml(r);

helpful article

http://www.thescripts.com/forum/thread383280.html



0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

This article will show, step by step, how to integrate R code into a R Sweave document
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now