TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
sauravchat2002
NA
3
0
converting XML to string
Dec 1 2003 4:13 AM
i want to obtain data in XML format from dataset into a string i have done the following: Dim memstr As New MemoryStream Dim xmlpath As String = "C:\logintable.xml" Dim doc As New System.Xml.XmlDocument Dim writer As New XmlTextWriter(memstr, Encoding.UTF8) Dim returndata As String Dim buf() As Byte If Not IsPostBack Then dataset1.Clear() dataadapter.Fill(dataset1) dataset1.WriteXml(xmlpath) End If doc.Load(xmlpath) doc.Save(writer) buf = memstr.ToArray() returndata = Encoding.UTF8.GetString(buf, 0, buf.Length) writer.Close() xsltoutput.Text = returndata but the output string doesnot contains any XML tag. It is simply showing the node values in a string like: sauravc123Saurav But in XML(in the file mentioned as 'xmlpath' in the code) it was:
sauravc
123
Saurav
Reply
Answers (
3
)
Busy Window Control
web environment