Image

Imagefuzzygoth wrote in Imagewebdev 😡frustrated

Receiving XML feed from Flash into asp

Okay thanks pete and matt from the help last night but i am still not
getting any results, tbh i don't know flash or xml makes this harder
i guess.

thoughts


Okay I am receving an XML file send by sendandload to an asp file
Basically the scores are send to the asp file which reads it does a
replace and then writes it to an xml file. Though i can seem to
receive the results in the destination xml file.

Ps: I know nothing of flash or xml any help would be vastly
appreciated.


This is the function in flash sending out the xml string

function updateXML() {
server_file = "simple_save.asp";
scoreXML.sendAndLoad(server_file, scoreXML);
feedback = "Sending...";
}

this is my code to receive it

xmltest=request.form("ScoreXML")
response.Write(xmltest)

CONST ForReading = 1, ForWriting = 2, ForAppending = 8
CONST TristateUseDefault = -2, TristateTrue = -1, TristateFalse = 0

xmltest = request.form("xmltest")

Dim objFSO, objFile
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = fso.getfile.xmltest



Dim objFileTextStream
Set objFileTextStream = objFile.OpenAsTextStream(ForReading, TristateTrue)

Dim strLine
Do While objFileTextStream.AtEndOfStream <> True
strLine = server.HTMLEncode(objFileTextStream.ReadAll)
response.Write(strLine)
Loop

Dim strLineStore
strLineStore = strLineStore + strLine

Dim fso, ts
Set fso = CreateObject("Scripting.FileSystemObject")
Set ts = fso.CreateTextFile("c:\websites\keepyup\scoreboard\scores.xml", true)
strLine = replace(strline, "<", "<")
strLine = replace(strline, ">", ">")
strLine = replace(strline, """, "'")
ts.WriteLine (strLine)
ts.Close


Response.write("
File Written")