Ciao ho un ticker XML, ovvero un file ASP che esporta come XML che vado poi a leggere
Ho un problema, anzi due ...
1 - Se tra un tag e l' altro inserisco un BR, non vedo gli altri nodi, rimane sempre sullo stesso.
2 - Se Formatto il tag in HTML, mi passa i dati tra due virgole ..
codice:ActionScript function ApriXML() { mioxml = new XML(); notizie = new Array(); arraynews = new Array(); mioxml.load('http://localhost/Simedia/Asp/LEGGINEWS.asp'); // mioxml.load(filexml); mioxml.onLoad = ParseXML; function ParseXML(success) { if (success) { notizie = new Array(); notizie = mioxml.childNodes; // leggo l'array e solo gli elementi non vuoti (che sarebbero gli spazi bianchi lasciati tra i tag dell'XML) vengono aggiunti alla stringa delle news for (i=0; i<notizie.length; i++) { if (notizie[i].childNodes.toString() != "") { arraynews.push(notizie[i].childNodes.toString()); } } _root.news_mc.clipnews_mc.testonews = arraynews[0]; } } }Sicuramente sono le impostazioni del file XML, cosa manca??codice:Pagina XML <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> <% Option Explicit %> <% Dim CN, CNN, RS, STR, DATA, A, M, D, XML, X %> <% CN = Application("Cnn") Set CNN = Server.CreateObject("ADODB.Connection") CNN.Open CN Set RS = Server.CreateObject("ADODB.RecordSet") STR = "SELECT * FROM NEWS" RS.Open STR, CNN, 3, 3 If RS.RecordCount = 0 Then Response.Write("Non ci sono news") Response.End() End If For X = 1 to RS.RecordCount A = Left(RS("DATA"),4) M = Mid(RS("DATA"), 5,2) D = Right(RS("DATA"),2) DATA = d & "-" & M & "-" & a XML = "<notizia>" & "<font color = '#FF6600'>Data : </font>" & DATA XML = XML & "<font color = '#FF6600'>Titolo : </font>" & RS("TITOLO") XML = XML & "<font color = '#FF6600'>News : </font>" & RS("NEWS") XML = XML & "</notizia>" Response.Write XML RS.MoveNext Next 'Response.Write(XML) %> <% RS.Close Set RS = Nothing CNN.Close Set CNN = Nothing %>


Rispondi quotando