[thelist] HTTP Request

James Hardy evolt at weeb.biz
Thu Jan 27 08:59:05 CST 2005

And lo; it came to pass that the great prophet, 
Chris.Marsh at Callserve.com spake. And the huddled masses rejoiced to hear:
> I am receiving XML from an HTTP request, which I then load into a DOM
> document. Recently I've been getting unspecified errors, and the XML has not
> been loading. The following snippet illustrates what I'm doing:
> Set xmldoc = Server.CreateObject("Msxml2.DOMDocument")
> xmldoc.resolveExternals = False
> xmldoc.validateOnParse = False
> xmldoc.Async = False
> xmldoc.setProperty "ServerHTTPRequest", True
> bXMLLoaded = xmldoc.load(Request)
Ok, that looks a tad suspect to me. Does it *ever* work? I would think 
that it does not. My reason for thinking this is the load method expects 
to take a string containing a URL (see 
)and you are passing it an object. as far as I am aware the default 
interface of the Request object is the Form Collection. The default of 
the Form collection is a string representing the entire contents of the 
post part of the transaction in it's raw unencoded form.

This would mean that it is trying to load a file on your server with the 
NAME equal to the xml string

you would actually want to use the loadXML method (see
) in something like this:

dim strXml
'at this point you may wish to do some verification to
'ensure that the string strXML contains data


More information about the thelist mailing list