Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. XmlDocument View Similiar to Browser Xml View

XmlDocument View Similiar to Browser Xml View

Scheduled Pinned Locked Moved C#
questionxmlperformancehelptutorial
9 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    h s n
    wrote on last edited by
    #1

    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 this xDoc 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 display xDoc into that browser component. Is there any other simple way to perform this task? please plzzz mention code. please guide thank you.

    L E 2 Replies Last reply
    0
    • H h s n

      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 this xDoc 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 display xDoc into that browser component. Is there any other simple way to perform this task? please plzzz mention code. please guide thank you.

      L Offline
      L Offline
      lost in transition
      wrote on last edited by
      #2

      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!!!

      H 1 Reply Last reply
      0
      • L lost in transition

        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!!!

        H Offline
        H Offline
        h s n
        wrote on last edited by
        #3

        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.

        L 1 Reply Last reply
        0
        • H h s n

          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.

          L Offline
          L Offline
          lost in transition
          wrote on last edited by
          #4

          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!!!

          1 Reply Last reply
          0
          • H h s n

            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 this xDoc 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 display xDoc into that browser component. Is there any other simple way to perform this task? please plzzz mention code. please guide thank you.

            E Offline
            E Offline
            ednrgc
            wrote on last edited by
            #5

            Have you tried setting the webBrowser's Url property?

            H 1 Reply Last reply
            0
            • E ednrgc

              Have you tried setting the webBrowser's Url property?

              H Offline
              H Offline
              h s n
              wrote on last edited by
              #6

              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

              E 1 Reply Last reply
              0
              • H h s n

                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

                E Offline
                E Offline
                ednrgc
                wrote on last edited by
                #7

                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.

                H 1 Reply Last reply
                0
                • E ednrgc

                  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.

                  H Offline
                  H Offline
                  h s n
                  wrote on last edited by
                  #8

                  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.

                  E 1 Reply Last reply
                  0
                  • H h s n

                    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.

                    E Offline
                    E Offline
                    ednrgc
                    wrote on last edited by
                    #9

                    Yes. Why not just download their sourcecode from codeplex and see how they did it?

                    1 Reply Last reply
                    0
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    • Login

                    • Don't have an account? Register

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • World
                    • Users
                    • Groups