Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

XML and dynamic records

Guest
Dec 27, 2007 Dec 27, 2007

Copy link to clipboard

Copied

I am using slide show pro, an xml based flash slideshow (see slideshowpro.net)

To generate the slidehow pictures, you use xml.... something like this:

<?xml version="1.0" encoding="UTF-8"?>
<gallery>
<album title="Property Gallery" description="Property Gallery" lgpath="../../properties/">
<img src="picture1.jpg>" />
<img src="picture2.jpg" />
<img src="picture3.jpg" />
<img src="picture4.jpg" />
<img src="picture5.jpg" />
<img src="picture6.jpg" />
<img src="picture7.jpg" />
<img src="picture8.jpg" />
</album>
</gallery>

What I would like to do is populate that list using a recordset. HOW can you populate an XML doc with a recordset?

experimenting I tried this (didn't work):

<%@LANGUAGE="VBSCRIPT"%>
<!--#include virtual="/Connections/connection.asp" -->
<%
Dim rsPhotos__MMColParam
rsPhotos__MMColParam = "1"
If (Request.QueryString("id") <> "") Then
rsPhotos__MMColParam = Request.QueryString("id")
End If
%>
<%
Dim rsPhotos
Dim rsPhotos_cmd
Dim rsPhotos_numRows

Set rsPhotos_cmd = Server.CreateObject ("ADODB.Command")
rsPhotos_cmd.ActiveConnection = MM_connCFLH_STRING
rsPhotos_cmd.CommandText = "SELECT id, picture1, picture2, picture3, picture4, picture5, picture6, picture7, picture8 FROM dbo.listings WHERE id = ?"
rsPhotos_cmd.Prepared = true
rsPhotos_cmd.Parameters.Append rsPhotos_cmd.CreateParameter("param1", 5, 1, -1, rsPhotos__MMColParam) ' adDouble

Set rsPhotos = rsPhotos_cmd.Execute
rsPhotos_numRows = 0
%>
<?xml version="1.0" encoding="UTF-8"?>
<gallery>
<album title="Property Gallery" description="Property Gallery" lgpath="../../properties/">
<img src="<%=(rsPhotos.Fields.Item("picture1").Value)%>" />
<img src="<%=(rsPhotos.Fields.Item("picture2").Value)%>" />
<img src="<%=(rsPhotos.Fields.Item("picture3").Value)%>" />
<img src="<%=(rsPhotos.Fields.Item("picture4").Value)%>" />
<img src="<%=(rsPhotos.Fields.Item("picture5").Value)%>" />
<img src="<%=(rsPhotos.Fields.Item("picture6").Value)%>" />
<img src="<%=(rsPhotos.Fields.Item("picture7").Value)%>" />
<img src="<%=(rsPhotos.Fields.Item("picture8").Value)%>" />
</album>
</gallery>
<%
rsPhotos.Close()
Set rsPhotos = Nothing
%>


Any ideas on how to do this?
TOPICS
Server side applications

Views

298
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 27, 2007 Dec 27, 2007

Copy link to clipboard

Copied

jsteinmann wrote:
> What I would like to do is populate that list using a recordset. HOW can you
> populate an XML doc with a recordset?

http://labs.adobe.com/technologies/spry/samples/utils/query2xml.html

--
David Powers, Adobe Community Expert
Author, "The Essential Guide to Dreamweaver CS3" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Dec 27, 2007 Dec 27, 2007

Copy link to clipboard

Copied

Thanks for the link. By the way... I just bought your book from Amazon... looking forward to getting it

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 28, 2007 Dec 28, 2007

Copy link to clipboard

Copied

LATEST
jsteinmann wrote:
> Thanks for the link. By the way... I just bought your book from Amazon... looking forward to getting it

Thank you. I hope you enjoy it.

--
David Powers, Adobe Community Expert
Author, "The Essential Guide to Dreamweaver CS3" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines