以下我通过vbscript通过调试:
中文正常,你可以参考一下。:)
<HTML xmlns:signature="urn:schemas-microsoft-com
ffice:access">
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html;charset=UTF-8"/>
</HEAD>
<BODY ONLOAD="ApplyTransform()">
</BODY>
<SCRIPT LANGUAGE="VBScript">
Option Explicit
Function ApplyTransform()
Dim objData, objStyle
Set objData = CreateDOM
LoadDOM objData, "mxml.xml"
Set objStyle = CreateDOM
LoadDOM objStyle, "mxml.xsl"
Document.Open "text/html","replace"
Document.Write objData.TransformNode(objStyle)
End Function
Function CreateDOM()
On Error Resume Next
Dim tmpDOM
Set tmpDOM = Nothing
Set tmpDOM = CreateObject("MSXML2.DOMDocument.5.0")
If tmpDOM Is Nothing then
Set tmpDOM = CreateObject("MSXML2.DOMDocument.4.0")
End If
If tmpDOM Is Nothing then
Set tmpDOM = CreateObject("MSXML.DOMDocument")
End If
Set CreateDOM = tmpDOM
End Function
Function LoadDOM(objDOM, strXMLFile)
objDOM.Async = False
objDOM.Load strXMLFile
If (objDOM.ParseError.ErrorCode <> 0) then
MsgBox objDOM.ParseError.Reason
End If
End Function
</SCRIPT>
</HTML>