none
How to read xml data from webbrowser?

    Question

  • hi everyone,

    recently, I got one task to read xml string and update it, and then save it as xml file

    so I choose the webbrowser contol in the winform. but I fond it is difficult to read xml data from webbrower. I tried to parse the string from webBrowser1.Document.Body.InnerText xmldocument, but seems that it has the "-" before some xml node. is there anything meet this kind of qustion? really appreciated if you can share anything with me. Thanks a lot.

    Thanks

    Winnie

    Wednesday, October 09, 2013 3:12 PM

Answers

  • Hello,

    Welcome to this forum.

    >>read xml string and update it, and then save it as xml file

    For achieving this, my suggestion is to use LinqToXML, it is very simple to operate the XML for whether reading xml string or reading a xml file.

    There is a walkthrough regarding it:

    http://msdn.microsoft.com/en-us/library/bb387098.aspx

    If you want to the webbrowser control only, and then I recommend you can post this issue to the ASP.NET forum:

    http://forums.asp.net/

    Thanks &Regards.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, October 10, 2013 8:10 AM

All replies

  • Hello,

    Welcome to this forum.

    >>read xml string and update it, and then save it as xml file

    For achieving this, my suggestion is to use LinqToXML, it is very simple to operate the XML for whether reading xml string or reading a xml file.

    There is a walkthrough regarding it:

    http://msdn.microsoft.com/en-us/library/bb387098.aspx

    If you want to the webbrowser control only, and then I recommend you can post this issue to the ASP.NET forum:

    http://forums.asp.net/

    Thanks &Regards.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Thursday, October 10, 2013 8:10 AM
  • Thanks a lot Fred. well. this way can help me customize the xml string. Basically, I only hope to implement one tool something like the one xml editor, which is similar as VS, and user can add/remove some node. thanks again

    Thanks

    Winnie

    Thursday, October 10, 2013 2:05 PM