XmlDocument View Similiar to Browser Xml View
-
Hi Everyone! I am unable to view xml document into Browser control. Please help me in this. Here is what I am doing:
XmlDocument xDoc = new XmlDocument(); xDoc.Load("Check.xml"); // xDoc now represents Check.xml into memory
I want to display thisxDoc
into "Microsoft Web Browser" component that is dropped on Form.private AxSHDocVw.AxWebBrowser axWebBrowser1; object obj = null; axWebBrowser1.Navigate(??????, ref obj, ref obj, ref obj, ref obj);
In first parameter if I use URL it works fine for it but tell me how can I displayxDoc
into that browser component. Is there any other simple way to perform this task? please plzzz mention code. please guide thank you. -
Hi Everyone! I am unable to view xml document into Browser control. Please help me in this. Here is what I am doing:
XmlDocument xDoc = new XmlDocument(); xDoc.Load("Check.xml"); // xDoc now represents Check.xml into memory
I want to display thisxDoc
into "Microsoft Web Browser" component that is dropped on Form.private AxSHDocVw.AxWebBrowser axWebBrowser1; object obj = null; axWebBrowser1.Navigate(??????, ref obj, ref obj, ref obj, ref obj);
In first parameter if I use URL it works fine for it but tell me how can I displayxDoc
into that browser component. Is there any other simple way to perform this task? please plzzz mention code. please guide thank you.private void InitializeComponent() { this.webBrowser1 = new System.Windows.Forms.WebBrowser(); this.SuspendLayout(); // // webBrowser1 // this.webBrowser1.Dock = System.Windows.Forms.DockStyle.Fill; this.webBrowser1.Location = new System.Drawing.Point(0, 0); this.webBrowser1.MinimumSize = new System.Drawing.Size(20, 20); this.webBrowser1.Name = "webBrowser1"; this.webBrowser1.Size = new System.Drawing.Size(718, 548); this.webBrowser1.TabIndex = 0; this.webBrowser1.Url = new System.Uri("C:\\ZJA\\VS2005\\Test.xml", System.UriKind.Absolute); } Try this: I read your post and this is what I did to check myself. 1: Create test.xml file 2: dropped a webbrowser on a from and set the url to my test.xml file 3: run and the webbrowser loaded the file without errors Jason
Sometimes simply is better than fancy. The developer stated after typing code line 10 billion!!!
-
private void InitializeComponent() { this.webBrowser1 = new System.Windows.Forms.WebBrowser(); this.SuspendLayout(); // // webBrowser1 // this.webBrowser1.Dock = System.Windows.Forms.DockStyle.Fill; this.webBrowser1.Location = new System.Drawing.Point(0, 0); this.webBrowser1.MinimumSize = new System.Drawing.Size(20, 20); this.webBrowser1.Name = "webBrowser1"; this.webBrowser1.Size = new System.Drawing.Size(718, 548); this.webBrowser1.TabIndex = 0; this.webBrowser1.Url = new System.Uri("C:\\ZJA\\VS2005\\Test.xml", System.UriKind.Absolute); } Try this: I read your post and this is what I did to check myself. 1: Create test.xml file 2: dropped a webbrowser on a from and set the url to my test.xml file 3: run and the webbrowser loaded the file without errors Jason
Sometimes simply is better than fancy. The developer stated after typing code line 10 billion!!!
-
Thanks Jason. I have XmlDocument class object that has Xml file loaded. I want to display that object contents into browser. I hope I am making clear.
If you are just wanting to view the xml file in a webBrowser then why are you loading it into a xmlDoc class in the first place? I guess you are doing something more than just viewing it right? Jason
Sometimes simply is better than fancy. The developer stated after typing code line 10 billion!!!
-
Hi Everyone! I am unable to view xml document into Browser control. Please help me in this. Here is what I am doing:
XmlDocument xDoc = new XmlDocument(); xDoc.Load("Check.xml"); // xDoc now represents Check.xml into memory
I want to display thisxDoc
into "Microsoft Web Browser" component that is dropped on Form.private AxSHDocVw.AxWebBrowser axWebBrowser1; object obj = null; axWebBrowser1.Navigate(??????, ref obj, ref obj, ref obj, ref obj);
In first parameter if I use URL it works fine for it but tell me how can I displayxDoc
into that browser component. Is there any other simple way to perform this task? please plzzz mention code. please guide thank you. -
yes I am doing little bit extra. I have loaded xml file into DOM "XmlDocument" class and modified its in memory. As DOM class loads xml file into memory in tree form. Now i want to display that modified file into browser control in form. is that possible??????????????? Thanks
-
yes I am doing little bit extra. I have loaded xml file into DOM "XmlDocument" class and modified its in memory. As DOM class loads xml file into memory in tree form. Now i want to display that modified file into browser control in form. is that possible??????????????? Thanks
-
Open it, change it, save it, then open it in web browser. You might want to output it to a stream instead of saving it.
-
Have you seen XML Notepad 2007. It creates XML file in treeView and when we click "XSL Output" tabpage it displays browser output of XML.