Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - XML file not saving >Thread Next - Re: XML file not saving Re: XML file not savingTo: NULL Date: 11/1/2004 10:49:00 AM I added some comments for each of problematic line,
> Set oXmlHttp = server.CreateObject("Microsoft.XMLHTTP")
-- antique progID, at least msxml2.xmlhttp
> oXmlHttp.open "GET", strurl, False
-- I suspect you want /post/ instead of /get/.
> '//open https connection to the server //
> oXmlHttp.setRequestHeader "Content-type", "text/xml"
> oXmlHttp.send oXMLDocument
>
> '// process the server response//
> iResponseStatus = oXMLHttp.status
> sResponseMsg = oXMLHttp.responseText
-- The last line should be placed on the exception block.
> If iResponseStatus = 200 Then '// success //
> sResponseXML = oXMLHttp.responseXML.xml
> 'Below uses parser for XML 3.0
> Set oXMLDoc = Server.CreateObject("MSxml2.domdocument.3.0")
> oXMLDoc.loadXML(sResponseXML)
-- oxmldoc.load(oxmlhttp.responsebody) is better.
> If oXMLDoc.hasChildNodes Then
-- if oxmldoc.load(oxmlhttp.responsebody) then
> 'Return drive/path from virtual directory
> 'e.g. /imaging/imghold/ path may be D:\imghold> strSaveFile = Server.MapPath("/imaging/imghold/")
> ' Make file name prefix be the userid
> strSaveFile = strSaveFile & struserid & ".xml"
> oXMLDoc.Save(strSaveFile)
-- The last line should come after you check the folder to be written. i.e.
oxmldoc.loadxml("<a/>"): oxmldoc.save strSaveFile
> End If
> Else
> ...
> End If
>
> Set xmlDoc = Server.CreateObject("Microsoft.xmldom")
-- antique progID. At least, msxml2.domdocument may get you msxml3.0.
>
> xmlDoc.async = False
> xmlDoc.load(strSaveFile)
> ...
>
>
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
