Computer Hope

Internet & Networking => Web design => Topic started by: kukua on October 16, 2006, 11:23:44 AM

Title: xml
Post by: kukua on October 16, 2006, 11:23:44 AM
Does anyone know if you can have a link in an xml page.  If so, a sample would be nice.  I have a project (web page) to hand in, and I would like to put some snippet of xml on the page.

Thanks.....
Title: Re: xml
Post by: Dilbert on October 16, 2006, 08:09:41 PM
You could possibly use a link in XML, but it's not worth the effort. You're better off coding it into the (X)HTML itself.

See, first you have to define it in XML as text, that text being the (X)HTML code. Then, you'd have to use a XLT file to place it in the exact spot... but since you're typing the code anyway, you may as well just put it in the (X)HTML.
Title: Re: xml
Post by: shouvik on October 16, 2006, 09:14:25 PM
Quote
Does anyone know if you can have a link in an xml page.

An XML is not actually a webpage, but a feed ( a nice way to automatically
insert latest post or entry ).

An XML feed has "item" or "feed entry" as individual part of it and each
item contains

1)title (title of the post or entry)
2)description (description of the post
3) link (URL of the post)

The link part will show you the actual link.

For running XML, you need to put XML code on a separate webpage and that would end in .xml extension(hence it not remains a webpage, but becomes a feed). Then you can put an XML button (pointing to that xml link) on your other webpage. When anyone click s on the XML button he gets the feed.

You can study any XML tutorial available on the web.