Re: Loading XML into WebBrowser

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



In article <MPG.1e284a17543c829a9896a5@xxxxxxxxxxxxxxxxxxxx>,
mrclean@p&G.com says...
> In article <uT9aDXREGHA.516@xxxxxxxxxxxxxxxxxxxx>, blank@xxxxxxxxxxx
> says...
> > Hi Mark
> >
> > Thanks for the reply. As you suggest, this would imply that MSHTML is doing
> > something special to navigated files that it does not do for streams. It
> > would be nice to know if it could be triggered for streams though. I wonder
> > if Igor has any idea?
> >
> > > I also noticed that even when you Navigate to an XML file which is
> > > "styled"
> > > using the builtin XSLT or your own XSLT, the DOM is not the resultant
> > > HTML.
> > > It's the raw XML. Not relevant, I know, but interesting.
> >
> > Yes, I agree; interesting.
> >
> > Charles
> <SNIP>
>
> I ran across a technique for loading MHTNL in WebBrowser using an APP
> that may work on XML, too. Let me see if I can find it.
>

OK, I found the code. It is Delphi but can easily be translated to
whatever you prefer.

To quote to poster:
"To use it, you have to use the Asynchronous Pluggable Protocol.
<snip>
With it, you can make a namespace, say myHTTP://www.mySite.com/ and it
works within your EXE file (available to your EXE ONLY). Then you
navigate to the myHTTP://www.mySite.com/sample.mht and then the
webbrowser uses the Asynchronouse Pluggable Protocol to provide it
with the MHT file. Once the event is fired you can provide the MHT to
it from a Memo, from a Stream which has MHT. Then the webbrowser will
navigate there. It's like a webbserver in your EXE!!! (Just an
analogy)."

So, if you have your XML in a stream, you would build an APP that took
your stream and forwarded it to the webbrowser vi the namespace.

If you'd like the code, let me know and I'll send it to you.
.



Relevant Pages

  • Re: How to show Excel, Word, PDF in WebBrowser from stream
    ... > ¤ I have a sql table with a binary field where any kind of document can be ... > ¤ I'd like to show them using webbrowser. ... but when I navigate to an Excel file and then I navigate to ... > ¤ I'd like to load the webbrowser with the stream without having to save it as ...
    (microsoft.public.vb.general.discussion)
  • Re: How to show Excel, Word, PDF in WebBrowser from stream
    ... I have a sql table with a binary field where any kind of document can be ... I'd like to show them using webbrowser. ... but when I navigate to an Excel file and then I navigate to ... I'd like to load the webbrowser with the stream without having to save it as ...
    (microsoft.public.vb.general.discussion)
  • How to show Excel, Word, PDF in WebBrowser from stream
    ... I'd like to show them using webbrowser (or PrintPreviewControl if possible). ... but when I navigate to an Excel file and then I navigate to ... I'd like to load the webbrowser with the stream without having to save it as ...
    (microsoft.public.vb.general.discussion)
  • Re: Pls Help with empty Print Preview
    ... HRESULT InvokeScript(LPCOLESTR lpszName, VARIANT* pvarParam1 = NULL, ... >> Navigate()? ... > you pass the ownership of the handle to the stream object. ...
    (microsoft.public.inetsdk.programming.webbrowser_ctl)
  • A newbies cry for help editing XML document
    ... Using VB.NET, VS2003, XML. ... I apologize for the length of this request. ... I build a reference to the book node, I get stuck on how to navigate through ... I've read every articles I can find on xml, xpath, doc, navigator, etc. ...
    (microsoft.public.dotnet.xml)