Buon giorno a tutti, ho un filmato flash che mi carica una galleria da xml.... fino a qui tutto funziona. Il codice xml generato è
adesso ho deciso di far caricare la galleria dinamicamente in asp e db access.Codice PHP:<?xml version="1.0" encoding="iso-8859-1" ?>
<?xml version="1.0" encoding="iso-8859-1" ?>
- <galleryXML>
<gallerySettings galleryTitle="COLOR GALLERY" thumbWidth="175" thumbHeight="100" numColumns="4" numRows="4" thumbSpace="5" frameSpace="50" />
- <galleryItems>
<image title="COLOR PHOTO 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="COLOR 01" imagePath="Galleries/Color Gallery/COLOR-01.jpg" thumbPath="Galleries/Color Gallery/Thumbnails/COLOR-01.jpg" backgroundPath="Galleries/Color Gallery/Backgrounds/COLOR-01.jpg" url="http://www.keidea.net" />
Ho trovato questo script
che mi estrae i dati regolarmente ma li formatta in maniera diversa da quello che ho come baseCodice PHP:<%@LANGUAGE="VBSCRIPT"%>
<% Response.ContentType="application/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>
sapete dirmi come poter formattare xml come il suo originale altrimenti flash non mi carica nienteCodice PHP:<?xml version="1.0" encoding="iso-8859-1" ?>
- <galleryxml> <gallerysettings galleryTitle="Acquari" thumbWidth="175" thumbHeight="100" numColumns="5" numRows="2" thumbSpace="10" frameSpace="10" /> - <galleryitems> - <image> <title>Pesce Cometa con grande coda rossa</title> <description>Pesce con pinna retro molto bella, generalmente di colore rosso</description> <thumbDescription>Pesce cometa</thumbDescription> <imagePath>Galleries/acquari/acquari-01.jpg</imagePath> <thumbPath>Galleries/acquari/Thumbnails/acquari-01.jpg</thumbPath> <url>Pesce Cometa</url> </image> - <image> <title>Pesce rosso</title> <description>LOREM IPSUM DOLOR SIT AMET, CONSECTETUER ADIPISCING ELIT. SED PRETIUM LACUS VEL NUNC. DONEC DUI MAGNA,</description> <thumbDescription>Pesce rsso e nero</thumbDescription> <imagePath>Galleries/acquari/acquari-02.jpg</imagePath> <thumbPath>Galleries/acquari/Thumbnails/acquari-02.jpg</thumbPath> <url>Pesce rosso</url> </image> </galleryitems> </galleryxml>
Graizie a tutti

Rispondi quotando
