Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2006-11-07
2
Medium Priority
?
380 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 5

Assisted Solution

by:prajapati84
prajapati84 earned 400 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 1600 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
Six Sigma Control Plans

610 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