VantiveGuy
Member
Hi,
I made a quick project thjis morning to read from an XML source URL and apply an XSL transform to it. The result is then sent to the default VS2005 browser control.
It worked fine, but I wanted to try the Microsoft IE Browser control as well and I found that this control does not have the DocumentText property.
How do I send a text stream to the MS IE Browser control?
For any interested, here is my code.
I have the XML URL in TExtBox1, and the XSL location in TextBox2.
Dim myTransform As New XslCompiledTransform()
myTransform.Load(TextBox2.Text)
' The following block streams the transformed text to a web control
Dim myText As New System.IO.MemoryStream
Dim myOutput As New System.Xml.XmlTextWriter(myText, System.Text.Encoding.UTF32)
myTransform.Transform(TextBox1.Text, Nothing, myOutput)
myOutput.Flush()
myText.Position = 0
Dim sr As New StreamReader(myText)
WebBrowser1.DocumentText = sr.ReadToEnd()
The above works OK, but when I substitute the MS IE Browser the DocumentText property is no longer available. I can't find an equivalent.
Can anyone point me in the right direction for this?
Thanks for any help,
Alan.
I made a quick project thjis morning to read from an XML source URL and apply an XSL transform to it. The result is then sent to the default VS2005 browser control.
It worked fine, but I wanted to try the Microsoft IE Browser control as well and I found that this control does not have the DocumentText property.
How do I send a text stream to the MS IE Browser control?
For any interested, here is my code.
I have the XML URL in TExtBox1, and the XSL location in TextBox2.
Dim myTransform As New XslCompiledTransform()
myTransform.Load(TextBox2.Text)
' The following block streams the transformed text to a web control
Dim myText As New System.IO.MemoryStream
Dim myOutput As New System.Xml.XmlTextWriter(myText, System.Text.Encoding.UTF32)
myTransform.Transform(TextBox1.Text, Nothing, myOutput)
myOutput.Flush()
myText.Position = 0
Dim sr As New StreamReader(myText)
WebBrowser1.DocumentText = sr.ReadToEnd()
The above works OK, but when I substitute the MS IE Browser the DocumentText property is no longer available. I can't find an equivalent.
Can anyone point me in the right direction for this?
Thanks for any help,
Alan.