Ciao
Ho questo tipo di problema:
ho un file .asp che genera un documento xml
- ---------------------------------------------
----------------genera_dati.asp--------------
---------------------------------------------
<?xml version="1.0" encoding="utf-8"?>
<links>
<%
RecordsXPagina=12
If Request.QueryString("pagina") = "" Then
pagina = 1
Else
pagina = CInt(Request.QueryString("pagina"))
End If
' IMPOSTO UN CONTATORE
contatore = 0
set rs = server.createobject("ADODB.Recordset")
sql = "SELECT * FROM tabella_link ORDER BY idlink ASC"
rs.open sql,conn,3,3
if not rs.eof then
rs.PageSize = RecordsXPagina
rs.AbsolutePage = pagina
c=0
for i=1 to RecordsXPagina
if not rs.eof then
Response.write "<link id="""&rs("idlink")&"""/><titolo>"&rs("titolo")&"</titolo><immagine>"&rs("immagine")&"</immagine>"
rs.movenext
' INCREMENTO IL VALORE DEL CONTATORE
contatore = contatore + 1
end if
next
rs.close
set rs = nothing
conn.close
set conn = nothing
end if
%>
</links>
---------------------------------------------
---------------------------------------------
e questo file flash che lo legge
- ---------------------------------------------
---------------------------------------------
filexml = "genera_dati.asp";
ApriXML();
function ApriXML () {
mioxml = new XML();
myarray = new Array();
mioxml.load(filexml);
mioxml.onLoad = ElaboraXML;
function ElaboraXML (success) {
if (mioxml.loaded) {
myarray = mioxml.childNodes;
trace ("Tot elementi = " + myarray.length);
for (i=0;i<=myarray.length;i++){
trace("elemento ["+i+"] ------------------")
trace(myarray[i])
}
};
};
};
---------------------------------------------
---------------------------------------------
ma flash non legge nulla e l'array risulta vuoto
per assurdo se salvo in in file xml il risultato della pagina asp è tutto ok...
DOVE SBAGLIO???????![]()
Grazie
Max

Rispondi quotando
