PC Review Forums Newsgroups Microsoft DotNet Microsoft Dot NET Framework Forms How do I display XML in the new .NET 2.0 WebBrowser control

Reply

How do I display XML in the new .NET 2.0 WebBrowser control

 
Thread Tools Rate Thread
Old 13-12-2005, 08:05 PM   #1
Henrik Skak Pedersen
Guest
 
Posts: n/a
Default How do I display XML in the new .NET 2.0 WebBrowser control


Hi,

I would like to show XML in the new builtin WebBrowser control. I have the
xml in a string.

I am trying to set the DocumentText property to my xml text. But the control
only shows the values and not the document.

How can I solve this?

Thanks Henrik.


  Reply With Quote
Old 14-12-2005, 05:54 AM   #2
Steven Cheng[MSFT]
Guest
 
Posts: n/a
Default RE: How do I display XML in the new .NET 2.0 WebBrowser control

Hi Henrik,

Welcome to msdn newsgroup.
As for the new managed WEbBrowser control in .NET framework 2.0, it is
still used to navigating file based documents, so there must exists an
phyisical file on the disk or over network url to let it navigate.... We
can not directly assign an in-memory document or stream ot it... So for
your scenario, I think you can consider creating a temp file to store the
in-memory XML stream and then let the webbrowser control navigate to that
temp file to display them, this is the most commonly used approach so far.

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)


--------------------
| From: "Henrik Skak Pedersen" <skak@community.nospam>
| Subject: How do I display XML in the new .NET 2.0 WebBrowser control
| Date: Tue, 13 Dec 2005 21:05:01 +0100
| Lines: 13
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
| X-RFC2646: Format=Flowed; Original
| Message-ID: <efDhBCCAGHA.2912@tk2msftngp13.phx.gbl>
| Newsgroups: microsoft.public.dotnet.framework.windowsforms
| NNTP-Posting-Host: 80.63.142.94
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msftngp13.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.windowsforms:91948
| X-Tomcat-NG: microsoft.public.dotnet.framework.windowsforms
|
| Hi,
|
| I would like to show XML in the new builtin WebBrowser control. I have
the
| xml in a string.
|
| I am trying to set the DocumentText property to my xml text. But the
control
| only shows the values and not the document.
|
| How can I solve this?
|
| Thanks Henrik.
|
|
|

  Reply With Quote
Old 14-12-2005, 07:01 PM   #3
Charles Law
Guest
 
Posts: n/a
Default Re: How do I display XML in the new .NET 2.0 WebBrowser control

Hi Henrik

You might like to ask this in

microsoft.public.inetsdk.programming.webbrowser_ctl

as the question is generally applicable to the WebBrowser control, and
doesn't just relate to the one in VS2005.

Charles


"Henrik Skak Pedersen" <skak@community.nospam> wrote in message
news:efDhBCCAGHA.2912@tk2msftngp13.phx.gbl...
> Hi,
>
> I would like to show XML in the new builtin WebBrowser control. I have the
> xml in a string.
>
> I am trying to set the DocumentText property to my xml text. But the
> control only shows the values and not the document.
>
> How can I solve this?
>
> Thanks Henrik.
>



  Reply With Quote
Old 14-12-2005, 09:19 PM   #4
tdavisjr
Guest
 
Posts: n/a
Default Re: How do I display XML in the new .NET 2.0 WebBrowser control

Charles,

The WebBrowser control is a new managed component in .NET 2.0. So, in
my opinion, this does relates to this group. You may be referring to
the old COM based web browser control. Either way, Steven most likely
gave the solution to this issue.

  Reply With Quote
Old 15-12-2005, 01:13 AM   #5
Charles Law
Guest
 
Posts: n/a
Default Re: How do I display XML in the new .NET 2.0 WebBrowser control

You are right to say that this is a managed component, but it is still the
same old mshtml and shdocvw underneath; the same as the ActiveX WebBrowser
control. The managed bit is just a hand-crafted wrapper, as opposed to the
automatically generated AxHost wrapper that VS2002/3 generate. In that
respect, an answer to the original question could be equally applicable to
the control in VS2002/3 and VS 2005. That is why I suggested the other
newsgroup, because there are people who live there with a great deal of
knowledge and experience of the core components.

Charles


"tdavisjr" <tdavisjr@gmail.com> wrote in message
news:1134595170.110727.268760@g49g2000cwa.googlegroups.com...
> Charles,
>
> The WebBrowser control is a new managed component in .NET 2.0. So, in
> my opinion, this does relates to this group. You may be referring to
> the old COM based web browser control. Either way, Steven most likely
> gave the solution to this issue.
>



  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off