XML-browser

admin

Administrator
Staff member
Hi,I am trying to view an xml-stream with a style sheet in VB. At the momentI am able to load an xml-file, parse it andview it with the webbrowser object. Here's the code:Private Sub Form_Load()Const Q As String = """"Dim strHTML As StringstrHTML = "<?xml version=" & Q & "1.0" & Q & "?>" _& "<!DOCTYPE book SYSTEM " & Q & "d:\data\esvb\venturabooks\dtd\booklgt.dtd"& Q & "[]>" _& "<?XML:stylesheet type=" & Q & "text/css" & Q & " href=http://forums.devx.com/archive/index.php/" & Q & "d:\data\esvb\cssfiles\boek.css" & Q & "?>" _& "<book>" & "<bookinfo>" & Q & "zerrzeaazer" & QstrHTML = strHTML + "</bookinfo></book>"WebBrowser1.Navigate2 "about:" & strHTMLWhile WebBrowser1.ReadyState <> READYSTATE_COMPLETEDoEventsWendWebBrowser1.Document.body.innerHTML = strHTMLEnd SubThis works fine, but now we want to load an xml-string and view it in VB.The problem is that if we load the xml (with XMLDoc.loadXML (strHTML)),it is processed as plain html. We want it to be processed as xml with thestyle sheetDoes anyone know how to solve this problem?
 
Back
Top