I rewrote some of the code so that there only will be created one object per task. In my first version, I created an object per URL-call. In this version, only one object is created per task.
Text-file with codePut code under
'(declarations) in the file, into the declarations part of the scriptlib, and
'Terminate into the terminate part. The functions place themselves when you paste them.
Dim httpobj As Variant
Dim source As Variant, style As Variant
Set httpobj = Nothing
Set source = Nothing
Set style = Nothing
If you want to get several XML-/XSL-files from the same source, you only need to login once per agent. If you're going to use the same XSL template for each xml-source, you only need to load this the first time.
login = "https://server.com/names.nsf?login&"+_
"username=foo&password=bar"
xmlurl = "https://server.com/db.nsf/first.xml"
xslurl = "https://server.com/db.nsf/first.xsl"
Print transformXML( login, xmlurl, xslurl )
xmlurl = "https://server.com/db.nsf/second.xml"
Print transformXML( "", xmlurl, "" )
xmlurl = "https://server.com/db.nsf/view?ReadViewEntries"
xslurl = "https://server.com/db.nsf/view.xsl"
Print transformXML( "", xmlurl, xslurl )