Solved

Classic ASP Create XML for Podcast

Posted on 2013-05-29
8
872 Views
Last Modified: 2013-05-31
Classic ASP VBScript
MS Access

Hello, all.

I have been scouring the net for a step-by-step on how to create a dynamic XML for a podcast, and I have found bits and pieces, but I must be missing a connection somewhere.

So - starting from scratch.

I have a site of a church with audio files for their sermons.
(http://islandchurchofwhidbey.org/sermons-videos.asp)

These audio files are dynamically pulling from an MS Access db via a simple recordset.

They would now like to have these audio files as podcasts.
The audio files are already edited and are MP3.

I guess my main hangup is regarding the XML Feed page.

1. How do I create the XML page? (Is there a template, etc.?)
2. Once created, do I just upload it to a directory of my choice on the hosting server?
3. Once uploaded, how does the XML feed get registered to, let's say, iTunes for users to subscribe to it?
4. Once registered, will the XML Feed point to the actual MP3 for a user to hear via iTunes?

I figure I will have to loop through the db with a recordset and dynamically populate specific fields in the XML list... just not sure of the format/template that is needed.

There may be a couple more questions I have, but these are probably the main ones.

Help please?


Thanks!
Shane
0
Comment
Question by:lshane
  • 4
  • 4
8 Comments
 
LVL 52

Accepted Solution

by:
Scott Fell,  EE MVE earned 500 total points
ID: 39206606
This is the article you want to look at http://support.microsoft.com/kb/281099 or http://www.w3schools.com/xml/

They key is you want to  simply create the xml on the fly.

Let's say this is what you want to end up with
<?xml version="1.0"?>
<podcast>
    <date>1/1/2013</date>
    <title>My Title</title>
    <url>http://www.mysite.com/mp3/sample.mp3</url>
    <description>Blah blah blah yakity yak yak</description>
</podcast>

Open in new window


Your asp would look like this

xml="<?xml version=""1.0""?>"

'lets loop through our data 
do until rs.eof

xml=xml&"<podcast>"
xml=xml&"<date>"&rs("date")&"</date>"
xml=xml&"<title>"&rs("title")&"</title>"
xml=xml&"<url>"&rs("url")&"</url>"
xml=xml&"<description>"&rs("description")&"</description>"
xml=xml&"</podcast>"

rs.movenext
loop

response.write xml

Open in new window


Start with the xml layout you need as I did above then convert it to dynamic based on what your xml calls for.  Let's say you save the page in a folder called feed. I would save the file as index.asp and the full url to the feed would be http://www.mysite.com/feed/  You could also use http://www.mysite.com/feed/somepage.asp

Once you are done, place the ur here http://validator.w3.org/ to check for valid xml.  Where html can be forgiving, the smallest error in your xml will break the page.
0
 

Author Comment

by:lshane
ID: 39206626
Thanks, padas.

I will definitely get started on working with what you gave me, but...

Once the XML is created, how is it "registered", or is it?


So, the idea would be for users to go to iTunes and "subscribe" to the church's podcast, where they would see a list of all the audio files (sermons).

So, I'll loop through the recordset to dynamically create the XML file, but I'm lost as to what to do with it after that.  LOL
0
 
LVL 52

Expert Comment

by:Scott Fell, EE MVE
ID: 39206669
For each feed you want to submit, the entity consuming the feed could have different requirements.  You should check with iTunes http://support.apple.com/kb/ht1819  and the dirty details on  how to set up the feed http://www.apple.com/itunes/podcasts/specs.html

Check out soundcloud too for hosting your content.  Or host your mp3's on google drive or a public dropbox or some other cdn.  I wouldn't suggest hosting on your own site.
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

Author Comment

by:lshane
ID: 39208293
Thank you, padas.

I'm working on it now - will hopefully have it ready to test tonight-ish.


ALSO - does the feed file have to have an ".xml" extension when submitting to iTunes for a podcast, or does it matter.

It seems I have to have the ".asp" extension in order for the server to perform the ASP function of looping through the db to output the XML data, but... will iTunes be "ok" with that, or will it be looking for an ".xml" extension?
0
 
LVL 52

Expert Comment

by:Scott Fell, EE MVE
ID: 39208336
The file structure has to be xml.  The extension can be anything the web server will interpret.
0
 

Author Comment

by:lshane
ID: 39208393
Oh, ok, right... so the XML is INSIDE the ASP file... so I can just submit my podcast with the "link" to the INDEX.asp file, which will contain the XML feed information.
0
 
LVL 52

Assisted Solution

by:Scott Fell, EE MVE
Scott Fell,  EE MVE earned 500 total points
ID: 39208575
Yes.  Try making a static xml file and save it as .asp and see what happens.   Make sure you post the link to the validator too.

Also, I forgot, the top line should be

response.write "response.ContentType=""text/xml""

or add it to the xml variable. http://www.w3schools.com/xml/xml_server.asp
0
 

Author Closing Comment

by:lshane
ID: 39211100
Thank you, padas.

Very helpful!
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question