Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 941
  • Last Modified:

Classic ASP Create XML for Podcast

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
lshane
Asked:
lshane
  • 4
  • 4
2 Solutions
 
Scott Fell, EE MVEDeveloper & EE ModeratorCommented:
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
 
lshaneAuthor Commented:
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
 
Scott Fell, EE MVEDeveloper & EE ModeratorCommented:
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
What Kind of Coding Program is Right for You?

There are many ways to learn to code these days. From coding bootcamps like Flatiron School to online courses to totally free beginner resources. The best way to learn to code depends on many factors, but the most important one is you. See what course is best for you.

 
lshaneAuthor Commented:
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
 
Scott Fell, EE MVEDeveloper & EE ModeratorCommented:
The file structure has to be xml.  The extension can be anything the web server will interpret.
0
 
lshaneAuthor Commented:
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
 
Scott Fell, EE MVEDeveloper & EE ModeratorCommented:
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
 
lshaneAuthor Commented:
Thank you, padas.

Very helpful!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

What Kind of Coding Program is Right for You?

There are many ways to learn to code these days. From coding bootcamps like Flatiron School to online courses to totally free beginner resources. The best way to learn to code depends on many factors, but the most important one is you. See what course is best for you.

  • 4
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now