how to read and write the xml file in c# and assign to a string
riyas_26
-1
Light Poster
Recommended Answers
Jump to Poststring xmlData = System.IO.File.ReadAllText(@"C:\test.xml"); System.IO.File.WriteAllText(@"C:\test.xml", xmlData);
Jump to PostHi Riyas,
as earlier suggested.. you can directly write that xml file into a string and you can print on the webpage.
here textbox1 is a textbox with multiplelines...protected void Page_Load(object sender, EventArgs e) { string xmlData = System.IO.File.ReadAllText(@"C:\test.xml"); System.IO.File.WriteAllText(@"C:\test.xml", xmlData); TextBox1.Text = xmlData; …
All 8 Replies
sknake
1,622
Senior Poster
Featured Poster
kameswari
2
Junior Poster in Training
riyas_26
-1
Light Poster
sknake
1,622
Senior Poster
Featured Poster
riyas_26
-1
Light Poster
kameswari
2
Junior Poster in Training
riyas_26
-1
Light Poster
kameswari
2
Junior Poster in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.