How to read XML file on web with QTP 11?
Question ID: 104592
1
0

I am trying to parse an XML file that is on the web but for some reason I can not load it. Does anybody know what I need to do to make this work?



vPath="http://www.w3schools.com/xml/cd_catalog.xml"
Set xmlObj = XMLUtil.CreateXML()
print vPath
xmlObj.LoadFile(vPath)
vlist = xmlObj.ToString()
print "XML:" & vlist

Marked as spam
Posted by (Questions: 45, Answers: 0)
Asked on September 12, 2012 7:40 am
38 views
Answers (1)
7
Private answer

I ran into this issue before and XMLUtil will not work directly with a URL. Try downloading the file to the local machine and changing vPath to point to the local file.

Marked as spam
Posted by (Questions: 2, Answers: 98)
Answered on September 12, 2012 7:53 am
EyeOnTesting

Welcome back to "EyeOnTesting" brought to you by Orasi Software, Inc.

X
Scroll to Top