Displaying XML-File in Webbrowser Control

  • Thread starter Thread starter Stropher
  • Start date Start date
S

Stropher

I have just created a Word document, saved it as XML-file.
Now I have created a WebBrowser-Control and would like to use it to
display the file, but how?
Could anyone give me some clues on how to do this?

Thanks in anticipation,
Stropher
 
Stropher said:
I have just created a Word document, saved it as XML-file.
Now I have created a WebBrowser-Control and would like to use it to
display the file, but how?
Could anyone give me some clues on how to do this?

XML is not a display format.

The XML written by word can only be displayed (like a word doc) by word so
one way of acheiving your goal is to embed word in your form instead of a
webbrowser.

In principle you could create a style sheet (xslt) to convert it to HTML but
it would be v. hard work (is the XML "application" documented?)

The simplest way is just to save the file as HTML

[caveats: I really only know about XML/HTML/XSLT; I haven't got the latest
version of word; I'm not an expert on OLE]
 
Thanks Nick for the quick answer..
I tried it this way
webBrowser1.Navigate(@"C:\temp\document.xml");
and it worked fine...

regards,
stropher
 
Stropher said:
Thanks Nick for the quick answer..
I tried it this way
webBrowser1.Navigate(@"C:\temp\document.xml");
and it worked fine...

regards,
stropher

I'm curious - this should just show the nested XML structure rather than a
pretty document unless the xml already references a stylsheet.
 
Back
Top