Solved

Classic ASP Create XML for Podcast

Posted on 2013-05-29
8
863 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
 

Author Comment

by:lshane
Comment Utility
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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 52

Expert Comment

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

Author Comment

by:lshane
Comment Utility
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
Comment Utility
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
Comment Utility
Thank you, padas.

Very helpful!
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:  The Exchange of information …
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

763 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

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now