con questo codice:
codice:
'---INIZIO RECUPERA DATI IN CICLO DAL DATABASE------------
strDataBasePath = "\mdb-database\database.mdb"
connDATI = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(strDataBasePath) & ";" & "JET OLEDB:Database Password=paperino"
viewuserSQL = "SELECT * FROM DocumentiUt"
'E creo il recordset
Set recDATI = Server.CreateObject ("ADODB.Recordset")
recDATI.Open viewuserSQL, connDATI, 3, 3
'Creo il Documento XML
xmlContent = "<?xml version=""1.0"" encoding=""UTF-8""?>"&VbCrLf
xmlContent = xmlContent & "<gallery>"&VbCrLf
xmlContent = xmlContent & "<album lgPath=""/"" tnPath=""/"" title=""Porsche"" description=""Album description"" tn=""album1/thumb/1.jpg"">"&VbCrLf
while not recDATI.eof
testo=recDATI("testo")
PercorsoImg1=recDATI("PercorsoImg1")
xmlContent = xmlContent & "[img][/img]"&VbCrLf
recDATI.movenext
wend
xmlContent = xmlContent & "</album>"&VbCrLf
xmlContent = xmlContent & "</gallery>"
'Fine Creazione XML
creo il seguente file xml:
codice:
<?xml version="1.0" encoding="UTF-8"?>
<gallery>
<album lgPath="/" tnPath="/" title="Dicembre" description="" tn="/AutoSystem/album1/images/1.jpg">
[img]/AutoSystem/album1/images/1.jpg[/img]
[img]/AutoSystem/album1/images/2.jpg[/img]
[img]/AutoSystem/album1/images/3.jpg[/img]
[img]/AutoSystem/album1/images/4.jpg[/img]
[img]/AutoSystem/album1/images/5.jpg[/img]
</album>
</gallery>
però non riesco a creare un secondo album, cioè non riesco a creare questo file xml:
codice:
<?xml version="1.0" encoding="UTF-8"?>
<gallery>
<album lgPath="/" tnPath="/" title="Dicembre" description="" tn="/AutoSystem/album1/images/1.jpg">
[img]/AutoSystem/album1/images/1.jpg[/img]
[img]/AutoSystem/album1/images/2.jpg[/img]
[img]/AutoSystem/album1/images/3.jpg[/img]
[img]/AutoSystem/album1/images/4.jpg[/img]
[img]/AutoSystem/album1/images/5.jpg[/img]
</album>
<album lgPath="/" tnPath="/" title="Novembre" description="" tn="/AutoSystem/album2/images/1.jpg">
[img]/AutoSystem/album2/images/1.jpg[/img]
[img]/AutoSystem/album2/images/2.jpg[/img]
[img]/AutoSystem/album2/images/3.jpg[/img]
[img]/AutoSystem/album2/images/4.jpg[/img]
[img]/AutoSystem/album2/images/5.jpg[/img]
</album>
</gallery>
in pratica dovrei dirgli che deve estrapolarmi i record per ogni "album" (album1, album2 etc...)