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= "<?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>"
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 "About:blank"
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.
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= "<?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>"
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 "About:blank"
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.