Advertise with us
Control Panel
Forum
Hosting Help
ASP.NET 4.5 & SQL 2012 Hosting
Resources
Notice
Login
Members
Shared Hosting
|
Upgrade
|
Advertise
|
Tutorials
|
Home
»
Resources
»
How to display the content of an XML
ASP.NET
ADO.NET
Web Services
Remoting
Visual Studio 2005
Error Bank
Interview Questions
Tips & Tricks
XML
HTML
Jscript/Javascript
IIS
Windows
General
Submit Resource or code snippet
... and get
surprise gifts
Win Digital camera, ASP.NET Books, Free softwares!!
How to display the content of an XML
08 Apr, 2008
Author:
Lhei Billones
Summary
a simple demonstration on how to display the content of an XML in textbox
.NET Classes used :
using System.Xml;
using System.IO;
using System.Text;
public void LoadXMLDocument(string strXMLPath)
{
XmlDocument XmlDocument1 = new XmlDocument();
MemoryStream MemoryStream1 = new MemoryStream();
XmlTextWriter XmlTextWriter1 = new XmlTextWriter
(MemoryStream1, Encoding.Unicode);
XmlDocument1.Load(strXMLPath);
XmlTextWriter1.Formatting = Formatting.Indented;
XmlDocument1.WriteContentTo(XmlTextWriter1);
XmlTextWriter1.Flush();
MemoryStream1.Seek(0, SeekOrigin.Begin);
StreamReader StreamReader1 = new StreamReader
(MemoryStream1);
TextBox4.Text = StreamReader1.ReadToEnd();
}
Feedbacks about this page from members:
- No Feedbacks yet !! -
Submit Feedback
View All Feedbacks
Total
members
:
250594
Average new registrations per day (in last 7 days):
11
New Registration:
Open
Register Now
Talk to Webmaster
Tony John
Facebook
Google+
Twitter
Advertise
Privacy Policy
Terms of use
Contact Us
SpiderWorks Technologies Pvt Ltd.
All Rights Reserved.