<%@ Language=VBScript %>
<%
Function TransformDocument(strxmlfile, strxslfile) 
  Dim strxmlpathfile, strxslpathfile, objsource, objstyle

  strxmlpathfile = Server.MapPath(strxmlfile)
  strxslpathfile = Server.MapPath(strxslfile)

  'XML-Datei laden 
  set objsource = Server.CreateObject("Microsoft.XMLDOM")
  objsource.async = false
  objsource.load strxmlpathfile

  'XSL-Datei laden
  set  objstyle = Server.CreateObject("Microsoft.XMLDOM")
  objstyle.async = false
  objstyle.load strxslpathfile
  
  on error resume next
  result = objsource.transformNode(objstyle)
  if (err.number<>0) then
    result = reportRuntimeError(exception)
  end if
  TransformDocument = result
End Function

response.write(TransformDocument("080xmlmitxsl.xml","080xmlmitxsl.xsl"))
%>

<title>ASP und XML: Serverseitige Transformation einer XML-Datei mit XSL</title>

Demo: beispiele/080xmlmitxsl.asp

Letzter Update: 26.12.2021 17:48

Zurück zur Liste mit ASP-Beispielen auf  www.ecotronics.ch