Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


loadXML() parse error 1072896760

From: Scott@-----------.---------.---
To: NULL
Date: 10/1/2004 4:41:00 PM
I am using the following code to retrieve xml from an external source and 
when I try to load the xml I get a parse error of 1072896760. The xml that is 
returned is random and I only receive the error every 5 to 10 request. I have 
put the xml into IE and it renders fine, I have saved the xml create a string 
out of it and that loaded fine. Can any one give me some help with this?

P.S. I have include the code and the actually xml that I received. You will 
not be able to using the url listed in the code to retrieve new xml.

Thanks for any help in advance!

Dim sourceUrl, xmlDoc, xmlHttp
sourceUrl = 
"http://www.somesource.com/search?client=someclient&output=xml_no_dtd&q=computers&num=0&ad=w15&adtest=on&adpage=3&adsafe=high&ip=10.1.4.80&useragent=Mozilla/4.0%20(compatible;%20MSIE%206.0;%20Windows%20NT%205.2;%20.NET%20CLR%201.1.4322)"

Set xmlDoc	= Server.CreateObject("MSXML2.DOMDocument.4.0")
Set xmlHttp = Server.CreateObject("MSXML2.XMLHTTP.4.0")

xmlHttp.open "GET", sourceUrl, False
xmlHttp.setRequestHeader "Content-Type", "text/xml"
xmlHttp.send()

Response.Write xmlHttp.responseText & "<br><br><br>" & chr(13) & chr(10)

xmlDoc.validateOnParse = false

xmlDoc.loadXML(xmlHttp.responseText)

Response.Write "Parse Error = " & xmlDoc.parseError & "<br><br>"

Response.Write "DOMDocument XML = <br>" & xmlDoc.xml & "<br><br>"



transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent