We help IT Professionals succeed at work.

vb script xmldom

KeithMcElroy asked
Medium Priority
Last Modified: 2012-05-11
The following code fails on Line 22 where I am returning the loaded xml document back to the operational code.  Is this a limiation of vb script, not being able to pass an xmldom object back from a function?  If not a limitaition of vb script, how do I code so xml doc is returned and able to be parsed in the operational code?

Other info:  This is used in a proprietary work flow designer for an ERP system.  
The scripting window in the work flow designer is vb script based.
dim template
set template = CreateObject("Microsoft.XMLDOM")

template = RetrieveTemplate
msgbox template

Function RetrieveTemplate()

	dim xmltemplate
	set xmltemplate = CreateObject("Microsoft.XMLDOM")
	xmltemplate.async = false

	file = "http://training7i/ifas7/workflow/custom/POPRRCFM/xml/seedrequestPOUPPR.xml"
	xmltemplate.load file
	msgbox xmltemplate.xml  'this works ok
	RetrieveTemplate = xmltemplate  'this fails

End Function

Open in new window

Watch Question

Expert of the Year 2008
Top Expert 2008
Unlock this solution and get a sample of our free trial.
(No credit card required)
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.