Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Load method with file URL file location reference

Status
Not open for further replies.

fboehlandt

Technical User
Sep 16, 2008
5
0
0
ZA
Hello everyone

I have some code that transforms and XML to HTML using a style sheet. The transformation below works fine:

Code:
'Load the XML and the XSL (the stylesheet)
Set oXML = CreateObject("MSXML.DOMDocument")
Set oXSL = CreateObject("MSXML.DOMDocument")
 
oXML.Load "D:\some directory\XMLfile.xml" 
oXSL.Load "D:\some directory\XSLtheme.xsl"
       
'Transform the XML using the stylesheet
sHTML = oXML.transformNode(oXSL)

However, the XLS file is usually referenced as a URL rather than a Windows file path (the XLS file is lolcated on a different server). Changing the relevant line to:

Code:
oXSL.Load "[URL unfurl="true"]http://srv001234.internal.com/somedirectory/XSLtheme.xsl"[/URL]

does not work, presumably since the load method does not work with URL. Do I have to access the file via browser and save locally or is there a quicker method? And if so, what would I have to do to dave the file to the local directory? Many thanks in advance
 
>presumably since the load method does not work with URL

Load method certainly ought to work. Indeed, it is specifically documented as working with URLs
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top