In message <00****************************@phx.gbl>, stringy
<an*******@discussions.microsoft.com> writes
How can i get content from xml file in a string format?
I have an xml file. Within the xml file is html code.
I want to do:
string webpage = !! somehow read xmlfile as a string
Response.Write(webpage);
protected override void Render(HtmlTextWriter writer)
{
string file = Server.MapPath("file.xml");
using (System.IO.StreamReader sr = new System.IO.StreamReader(file,
System.Text.Encoding.Default,false))
{
writer.Write(sr.ReadToEnd());
}
}
--
Steve Walker