WebBrowser + XML file
- New
- How-to
- PowerBuilder
- WebBrowser
-
Michael Krul
- PowerBuilder
- Sunday, 4 October 2026 02:40 PM UTC
Hi,
PowerBuilder 2022 R3 3397
After a recent Windows 11 (or Edge/WebView2) update, opening an XML file with:
wb_1.Navigate("file:///C:\1.xml")
started showing a red warning banner:
"This site uses XSLT; that functionality is being removed from this browser very soon..."

This began about a week ago.
Has anyone encountered this issue?
Is there an easy way to suppress or disable the warning (registry setting, browser policy, WebView2 option, PowerBuilder update, etc.)?
Thanx.
We have a temporary workaround, but we're looking for a simpler permanent solution.
//f_navigate_xsl_fix( string as_xml_path, webbrowser awb )string is_temp_htmlstring ls_xsl_path, ls_pi_data, ls_html_content, ls_source = 'f_navigate_xsl_fix'string ls_folder, ls_temp_name_without_extantionlong ll_start, ll_end, ll_filenuminteger li_return = 0OLEObject l_xml, l_xsl_doc, l_pi
l_xml = CREATE OLEObjectl_xml.ConnectToNewObject("MSXML2.DOMDocument.6.0")l_xml.async = FALSEl_xml.resolveExternals = TRUEl_xml.setProperty("AllowDocumentFunction", TRUE)l_xml.setProperty("AllowXsltScript", TRUE)
IF l_xml.load(as_xml_path) THEN l_pi = l_xml.selectSingleNode("processing-instruction('xml-stylesheet')") IF NOT IsNull(l_pi) and IsValid(l_pi) THEN ls_pi_data = l_pi.data ll_start = Pos(ls_pi_data, 'href="') IF ll_start > 0 THEN ll_start += 6 ll_end = Pos(ls_pi_data, '"', ll_start) ls_xsl_path = Mid(ls_pi_data, ll_start, ll_end - ll_start) IF Pos(ls_xsl_path, ":") = 0 AND Pos(ls_xsl_path, "\") = 0 THEN ls_xsl_path = Left(as_xml_path, LastPos(as_xml_path, "\")) + ls_xsl_path END IF l_xsl_doc = CREATE OLEObject l_xsl_doc.ConnectToNewObject("MSXML2.DOMDocument.6.0") l_xsl_doc.async = FALSE l_xsl_doc.resolveExternals = TRUE IF l_xsl_doc.load(ls_xsl_path) THEN ls_html_content = l_xml.transformNode(l_xsl_doc) // awb.NavigateToString(ls_html_content)// li_return = 1 // OK
// >>> FIX: don't NavigateToString - it breaks relative CSS/images <<< // Save transformed HTML into the SAME folder as the XML/XSL/CSS/images // so that relative paths (meuhedetCss.css, blank.gif, copyImg.png ...) resolve correctly. ls_folder = Left(as_xml_path, LastPos(as_xml_path, '\')) ls_temp_name_without_extantion = Mid(as_xml_path, LastPos(as_xml_path, "\") + 1) ls_temp_name_without_extantion = Left(ls_temp_name_without_extantion, len(ls_temp_name_without_extantion) - 4) // File Name Without '.xml' is_temp_html = ls_folder + 'html4del_' + ls_temp_name_without_extantion + String(Today(), 'yyyyMMdd') + & String(Now(), 'hhmmssff') + '.html' ll_filenum = FileOpen(is_temp_html, StreamMode!, Write!, LockWrite!, Replace!, EncodingUTF8!) IF ll_filenum > 0 THEN FileWrite(ll_filenum, ls_html_content) FileClose(ll_filenum)
awb.Navigate('file:///' + is_temp_html) li_return = 1 // OK ELSE li_return = -1 END IF ELSE li_return = -1 END IF ELSE li_return = -1 END IF ELSE // File without XSL li_return = 0 //By default END IFELSE li_return = -1END IF
IF IsValid(l_xsl_doc) THEN DESTROY l_xsl_docIF IsValid(l_pi) THEN DESTROY l_piIF IsValid(l_xml) THEN DESTROY l_xml
IF li_return <> 1 THEN // 0 OR -1 awb.Navigate('file:///' + as_xml_path)END IF
RETURN li_return
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.