Solved

Classic ASP Create XML for Podcast

Posted on 2013-05-29
8
867 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
 

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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to display the different types of results from a Query 2 36
Select distinct 25 82
Classic ASP - problem with MS SQL Select Query? 10 57
ASP SQL Syntax Duplicate Key 7 92
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 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…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

911 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

16 Experts available now in Live!

Get 1:1 Help Now