Function transformXML( login As String, xml As String, xsl As String) As String 'xml is the url to the XML to transform, e.g. http://your.domain.com/db.nsf/view?readviewentries 'xsl is the url to the XSL-template, e.g. http://your.domain.com/db.nsf/transformview.xsl Dim source As Variant, style As Variant Set source = CreateObject( "Microsoft.XMLDOM" ) source.async = False 'login is optional. Only use when you need to authenticate on the server 'form of login-url: http://your.domain.com/names.nsf?login&username=you&password=theuser If login <> "" Then source.load( login ) End If source.load( xml ) Set style = CreateObject( "Microsoft.XMLDOM" ) style.async = False style.load( xsl ) If Not(source.parseError.errorCode = 0) Then Error source.parseError.errorCode , source.parseError.reason Else 'transform source transformXML = source.transformNode(style) End If 'not sure if this is necessary to avoid memory leaks Set style = Nothing Set source = Nothing End Function 'html request onserver Function getHTML(url As String) As String If Datatype ( httpobj ) = 0 Then 'ikke initialisert Set httpobj = CreateObject("WinHTTP.WinHTTPRequest.5.1") End If Call httpobj.Open("GET", url,False) ' Send the HTTP Request. Call httpobj.Send getHTML = httpobj.ResponseText Set httpobj = Nothing End Function