Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

internet control problem

Status
Not open for further replies.

gabster

Programmer
Oct 23, 2001
192
US
Hello everyone!

I have trouble passing an xml string to a Internet Explorer Component placed on a form. Well, the problem is mainly displaying the xml in the browser...
If I pass html tags, that's perfect but when I pass xml tags (that's when the problem comes: it is displayed simply as text with no
formating etc. even if I have a style sheet (xsl)included.

Here is the code of the form that passes the xml string:

Private Sub Command1_Click()
Load frmXML
frmXML.strHTML= &quot;<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet type='text/xsl' href='demographics.xsl'><demographics><Patient><Name>JONES,HAROLD</Name><Acct>1458</Acct></Patient></demographics>&quot;
frmXML.Init
frmXML.Show
End Sub

And here is the code I have on the form where the microsoft internet
control is placed (frmXML):

Option Explicit

Public strHTML As String

Public Sub Init()
WebBrowser1.Navigate &quot;About:blank&quot;
WebBrowser1.Document.open
WebBrowser1.Document.write strHTML
WebBrowser1.Document.Close
End Sub

Anyone has an idea what am I doing wrong?

thanks a lot
gabi.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top