471,325 Members | 1,582 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,325 software developers and data experts.

Displaying XML-File in Webbrowser Control

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

Jan 31 '06 #1
3 13687

"Stropher" <hm***@gmx.net> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
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]
Jan 31 '06 #2
Thanks Nick for the quick answer..
I tried it this way
webBrowser1.Navigate(@"C:\temp\document.xml");
and it worked fine...

regards,
stropher

Jan 31 '06 #3

"Stropher" <hm***@gmx.net> wrote in message
news:11**********************@g44g2000cwa.googlegr oups.com...
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.

Jan 31 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by mr_burns | last post: by
4 posts views Thread by El Durango | last post: by
5 posts views Thread by Jelks Cabaniss | last post: by
1 post views Thread by stotty | last post: by
3 posts views Thread by Bernardo Gomes | last post: by
12 posts views Thread by korund | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.