Visualizzazione dei risultati da 1 a 2 su 2
  1. #1

    xml generato da db tramite asp

    Salve a tutti, dopo un giorno di ricerca sono costretto a scrivere per trovare soluzione al mio problema.
    Ho una fotogallery su flash che mi carica i dati da xml e tutto funziona bene.
    Ora mi sono deciso di far caricare i dati dinamicamente da database ma non riesco a trovare il risultato giusto che sia letto regolarmente da flash. Sapete indicarmi qualcosa?
    Ho provato leggendo a dx e sx ma l'unico risultato ottenuto è il seguente:
    ---
    Posto il codice che flash legge regolarmente:
    ---
    <?xml version="1.0" encoding="iso-8859-1"?>

    <galleryXML>

    <gallerySettings
    galleryTitle = "ACQUARI"
    thumbWidth = "175"
    thumbHeight = "100"
    numColumns = "5"
    numRows = "2"
    thumbSpace = "10"
    frameSpace = "10"
    >
    </gallerySettings>

    <galleryItems>
    <image
    title = "ACQUARIO 01"
    description = "LOREM IPSUM DOLOR SIT AMET, CONSECTETUER ADIPISCING ELIT. SED PRETIUM LACUS VEL NUNC. DONEC DUI MAGNA, ULLAMCORPER AT, FAUCIBUS CONVALLIS, HENDRERIT ID, NISI. UT VOLUTPAT POSUERE DIAM. PROIN AT MAURIS. ALIQUAM PELLENTESQUE NONUMMY FELIS. PRAESENT NEQUE MAGNA."
    thumbDescription = "ACQUARIO 01"
    imagePath = "Galleries/acquari/acquari-01.jpg"
    thumbPath = "Galleries/acquari/Thumbnails/acquari-01.jpg"
    backgroundPath = "Galleries/acquari/Backgrounds/acquari-01.jpg"
    url = ""
    >
    </image>

    <image
    title = "ACQUARIO 02"
    description = "LOREM IPSUM DOLOR SIT AMET, CONSECTETUER ADIPISCING ELIT. SED PRETIUM LACUS VEL NUNC. DONEC DUI MAGNA, ULLAMCORPER AT, FAUCIBUS CONVALLIS, HENDRERIT ID, NISI. UT VOLUTPAT POSUERE DIAM. PROIN AT MAURIS. ALIQUAM PELLENTESQUE NONUMMY FELIS. PRAESENT NEQUE MAGNA."
    thumbDescription = "ACQUARIO 02"
    imagePath = "Galleries/acquari/acquari-02.jpg"
    thumbPath = "Galleries/acquari/Thumbnails/acquari-02.jpg"
    backgroundPath = "Galleries/acquari/Backgrounds/acquari-02.jpg"
    url = ""
    >
    </image>

    </galleryItems>

    </galleryXML>
    -----
    Adesso posto la pagina asp che avevo creato ma che non funziona
    ---
    <%@LANGUAGE="VBSCRIPT"%>
    <% Response.ContentType="text/xml" %>
    <?xml version="1.0" encoding="iso-8859-1"?>
    <galleryXML>
    <gallerySettings
    galleryTitle="Acquari"
    thumbWidth="175"
    thumbHeight="100"
    numColumns="5"
    numRows="2"
    thumbSpace="10"
    frameSpace="10"
    ></gallerySettings>
    <galleryItems>
    <%
    dim adoConnect
    dim adoRecordset

    Set adoConnect = Server.CreateObject("Adodb.Connection")
    adoConnect.open "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath("../../mdb-database/acquari.mdb")

    Set adoRecordset = adoConnect.Execute("SELECT * FROM Prodotti")

    Do while not adoRecordset.EOF%>
    <image>
    <%
    response.write "<title>" + adoRecordset("Nome_prodotto") + "</title>"
    response.write "<description>" + adoRecordset("Descrizione") + "</description>"
    response.write "<thumbDescription>" + adoRecordset("Nome_Breve") + "</thumbDescription>"
    response.write "<imagePath>" + adoRecordset("Foto_prew") + "</imagePath>"
    response.write "<thumbPath>" + adoRecordset("Foto_Thumb") + "</thumbPath>"
    response.write "<url>" + adoRecordset("Email_Subject") + "</url>"
    %>
    </image>
    <% adoRecordset.MoveNext
    Loop

    adoRecordset.Close
    Set adoRecordset = Nothing
    adoConnect.Close
    Set adoConnect = Nothing

    %>
    </galleryItems>
    </galleryXML>

  2. #2
    come potete vedere da quanto scritto sopra la pagina asp mi da il risultato giusto prelevato dal db, ma come faccio a riversarlo nella pagina xml? e, ma è giusto quello che sto facendo?

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2026 vBulletin Solutions, Inc. All rights reserved.