Ezilon.com - Target Your Audience, be Seen in Your Region

Create a simple XML News feed

You are viewing this site as a guest. Join our community to get your questions answered and share knowledge. Active members may advertise and ask for a website critique.

They have: 25 posts

Joined: Aug 2004

I am pretty new to the whole XML stuff. But what I am wanting to do is this:
I want to create news on my golf site. And have another site link to it using xml. Just a basic design like:

Current Golf News
Date: Link:
8/10/04 Golf is awsome
8/14/04 Tiger woods is on one!

So what I need to know, is how excatly to create the .xml file I will be using, and what does the other webmaster need to know to display my .xml file on there site?
I did up a small type .xml file.. is this wrong?

<?xml version='1.0' encoding='utf-8'?>

"8/4/10"
"AzodGolf.com"

"8/4/10"
"AzodGolf.com"

KarenArt's picture

She has: 354 posts

Joined: May 2001

Is this a rss newsfeed?

If so, I think this is what you'd want...

<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF>
<channel>
<date>"8/4/10"</date>
<link>"AzodGolf.com"</link>
<date>"8/4/10"</date>
<link>"AzodGolf.com"</link>
</channel>
</rdf:RDF>

'

Take a look at http://freedomink.org/node/view/62
Sorry if this isn't what you're doing.

gotta finish redesigning my sites so I can show them again.

The purpose of education is... to get more jokes!

They have: 25 posts

Joined: Aug 2004

RSS newsfeed, perfect. Yea that is what I am wanting.
So lets say now that I created this .xml file with the above Code.
How do I display that on my .asp or .htm site? The link you gave me showed how to do it via PHP.

KarenArt's picture

She has: 354 posts

Joined: May 2001

I've never done an rss feed myself, but doing a simple google search there seems to be tons of great information on the subject.

There's a nice introduction to rss at http://www.mnot.net/rss/tutorial/.
I'm sure you can get lots of info and links from this site.

Best of luck! Sounds like a fun project. Laughing out loud

Looks like Abhishek Reddy and I were posting at the same time.
See... lots of great info out there. Laughing out loud

gotta finish redesigning my sites so I can show them again.

The purpose of education is... to get more jokes!

Abhishek Reddy's picture
Moderator

He has: 3,284 posts

Joined: Jul 2001

Also, it seems you want to create a feed yourself too. These articles explain how:

http://aspnet.4guysfromrolla.com/articles/021804-1.aspx
http://www.4guysfromrolla.com/webtech/031303-1.shtml

... linked from http://aspnet.4guysfromrolla.com/articles/102903-1.aspx (posted previously).

Smiling

They have: 25 posts

Joined: Aug 2004

*phew* some confusing stuff here I guess lol

I created an .xml file: azodusa.com/golf/golfrss.xml

and from what I learned on these sites, THIS should work:

<?php
=getXML("http://www.azodusa.com/golf/golfrss.xml")
?>

for any .asp page wanting to display my feed. But when I try it on my page I get this:
Microsoft VBScript runtime error '800a000d'

Type mismatch: 'getXML'

/golf/testrss.asp, line 4

any ideas?

KarenArt's picture

She has: 354 posts

Joined: May 2001

I'm not sure... your xml page is the one displaying a parsing error.

Did you put the xml code at the top like this...
<?xml version="1.0" ?>'

gotta finish redesigning my sites so I can show them again.

The purpose of education is... to get more jokes!

Abhishek Reddy's picture
Moderator

He has: 3,284 posts

Joined: Jul 2001

Also, typo:

</item>

</chann<strong>n</strong>el>
</rss>

'

They have: 25 posts

Joined: Aug 2004

Ok I redid the xml file: azodusa.com/golf/golfrss.xml

But I am having trouble on how to link this stuff on an external .htm file. I can't find any good information on any of these links on how to do it. Most have it on .asp, but I know it's possible on an .htm file. Any ideas on that?

Abhishek Reddy's picture
Moderator

He has: 3,284 posts

Joined: Jul 2001

You'll have to set the server up to parse .htm first as ASP and then return HTML.

Or you could use an ASP or other server-side script to parse the XML file and create another HTML-compatible file, which you finally include into your main HTML page using SSI (server-side includes).

Another possibility is to use that same ASP parsing script, but to include the HTML code using frames... avoid this method if you can. Frames aren't a good idea. Smiling

They have: 25 posts

Joined: Aug 2004

Abhishek Reddy wrote:

Or you could use an ASP or other server-side script to parse the XML file and create another HTML-compatible file, which you finally include into your main HTML page using SSI (server-side includes).

That sounds about right.. I will give that a try and see how it works, Thanks :explode: