Click here to Skip to main content
15,887,683 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
I have a xml. I want to set the value of the Web Browser control with it and display as a Xml.

how do I tell it to display as a XML ?





System.Xml.XmlTextReader oXmlTextReader = new
System.Xml.XmlTextReader(@"D:\Demo\data.xml");
System.Text.StringBuilder oStringBuilder = new System.Text.StringBuilder( ) ;

oStringBuilder.Append(oXmlTextReader.ReadOuterXml( ) ) ;
while (oXmlTextReader.Read())
{
oStringBuilder.Append(oXmlTextReader.ReadOuterXml( ) ) ;
}
wbWebBrowser.Navigate(oStringBuilder.ToString());
Posted
Updated 15-Oct-13 3:44am
v2

1 solution

What's wrong with wbWebBrowser.Navigate(@"D:\Demo\data.xml");?

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900