w***@gmail.com
2005-07-20 14:27:28 UTC
Hello, I'm having some problems writing out xml.ResponseText to a text
file. I can send it to a web browser using Response.Write, but I can
not write it out to a text file. It's not a permissions issue, the
file gets created without a problem and if you write a line of plain
text to the file, it works perfectly. I tried casting xml.ResponseText
to a string, but that did not work either. Is there anyway I can do
this?
<%
Const ForWriting = 2
Set FSO = Server.CreateObject("Scripting.FileSystemObject")
Set xml = Server.CreateObject("Microsoft.XMLHTTP")
xml.Open "GET", "http://xxxx", False
xml.Send
set tfile=FSO.CreateTextFile("c:/pathtofile.asp", true)
'response.write xml.ResponseText <--- Works
'tfile.WriteLine "Hello World" <---- Works
tfile.WriteLine(test)
tfile.close
set fso = nothing
%>
file. I can send it to a web browser using Response.Write, but I can
not write it out to a text file. It's not a permissions issue, the
file gets created without a problem and if you write a line of plain
text to the file, it works perfectly. I tried casting xml.ResponseText
to a string, but that did not work either. Is there anyway I can do
this?
<%
Const ForWriting = 2
Set FSO = Server.CreateObject("Scripting.FileSystemObject")
Set xml = Server.CreateObject("Microsoft.XMLHTTP")
xml.Open "GET", "http://xxxx", False
xml.Send
set tfile=FSO.CreateTextFile("c:/pathtofile.asp", true)
'response.write xml.ResponseText <--- Works
'tfile.WriteLine "Hello World" <---- Works
tfile.WriteLine(test)
tfile.close
set fso = nothing
%>