|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Webbrowser & XMLHi,
I am using the WebBrowser control included with VS2005 to view XML files, and they are being displayed correctly as far as I can tell. The problem I am having is saving these XML files to disk. If I try to save the contents of the WebBrowser.DocumentText to disk, the resulting file contains HTML and script that I don't want. Is there any way I can save the actual XML document to disk from the WebBrowser control? Many thanks. Lee. Hello Lee,
This is just a hunch, but a HTTPRequestDocument should retrieve pure XML and not the HTML code that then IE adds while rendering. Regards Cyril Gupta "Lee" <l**@somewhere.com> wrote in message Can you clarify what you want to do? Are you modifying the XML in any way? news:eKaAAdnGGHA.1396@TK2MSFTNGP11.phx.gbl... > I am using the WebBrowser control included with VS2005 to view XML files, > and they are being displayed correctly as far as I can tell. > If I try to save the contents of the WebBrowser.DocumentText to disk, the > resulting file contains HTML and script that I don't want. Is there any > way > I can save the actual XML document to disk from the WebBrowser control? If not, why is there any need to save from IE, as opposed to copying from your original source? That aside, what is interesting here is that if you load XML into a WebBrowser, right-click and choose View Source, you get the original file. Maybe it does it like this: When IE displays XML, it applies a stylesheet to give you the pretty hierarchical view. However, have a look here: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwebteam/html/webteam05072001.asp and note this: "Conveniently, as well as transforming your XML into a collapsible hierarchy display, Internet Explorer also adds an XMLDocument expando property to the document object that provides access to the original XML." It looks like you can get at this through the DOM, or adapt the C++ code in the article :-) Tim Read my tech blog: http://www.itwriting.com/blog
VB for .NET Recommended?
They do this in C# can't we do it in VB?? aggregation simple .net code column subtotals in a datagrid how to prevent multiple instances of 2nd form? reuse query results for multiple object populations? (and dynamic variable names?) Wordwrap in VB.Net listbox? Checking a string for filename compliance Crystal Report parameter dialog box ShouldSerialize problem in inherited control |
|||||||||||||||||||||||