Contact Us Forum Rules Search Archive
WebProWorld Part of WebProNews.com
Page One Link To Us Edit Profile Private Messages Archives FAQ RSS Feeds  
 

Go Back   WebProWorld > Site Design > Syndication and Social Media Discussion Forum
Subscribe to the Newsletter FREE!


Register FAQ Members List Calendar Arcade Chatbox Mark Forums Read

Syndication and Social Media Discussion Forum Got a favorite blog, podcast or otherwise syndicated site? Let eveybody else in on it. Have some questions, comments, ideas or concerns about how to more effectively use blogs, syndication and social media for your business/pleasure? Let's chat about those too.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-02-2007, 07:14 PM
Tony_V's Avatar
WebProWorld Member
 

Join Date: Jan 2004
Posts: 99
Tony_V RepRank 1
Default xml questions

xml is something I know nothing about and I am needing some feedback if anyone can help.
I know a little about rss... lets say I have an xml feed, can I turn this into an rss in any way. I actually have two files an xml and a dtd file. is there an easy way to convert these to an html page that viewers to a website can view and interact with? for example click links etc.

I am an idiot when it comes to this stuff, so if you can keep it as simple as possible that would be great.

Thanks for your time and any feedback.
Reply With Quote
  #2 (permalink)  
Old 12-03-2007, 11:37 AM
wige's Avatar
Moderator
WebProWorld Moderator
 

Join Date: Jun 2006
Location: United States
Posts: 1,825
wige RepRank 4wige RepRank 4wige RepRank 4wige RepRank 4
Default Re: xml questions

For turning XML into RSS, RSS is actually a type of XML document. Simply reformat the document according to the RSS standard, which sets out the recognized tags, and you will be all set.

As far as making an XML file readable by a web browser, yes it is possible. I have done this with RSS feeds in the past so that if a visitor viewed my RSS feed with their browser it would look just like a normal web site. This uses template files called XSLT. No, I don't remember what that stands for, I just browsed through the BBC's RSS feeds until I figured out how they did it.

This method is not perfect for RSS feeds because some browsers, especially Firefox, take all RSS feeds and render them as web pages with a default layout set in the browser, overriding or ignoring your XSLT stylesheet. However, if you would like to see a large scale web site that is completely built on XML, check out the World of Warcraft Armory site (wowarmory.com) which is built completely in XML. Try a few searches, and view the code, and you can get an idea of how powerful this technology is. Bear in mind, there are literally hundreds, if not thousands, of other web sites that are able to pull data off of this site because the data is presented so effectively.
__________________
The best way to learn anything, is to question everything.
Reply With Quote
  #3 (permalink)  
Old 12-03-2007, 11:47 AM
kgun's Avatar
WebProWorld 1,000+ Club
 

Join Date: May 2005
Location: Norway
Posts: 5,344
kgun RepRank 3kgun RepRank 3
Default Re: xml questions

Quote:
Originally Posted by Tony_V View Post
I know a little about rss... lets say I have an xml feed, can I turn this into an rss in any way. I actually have two files an xml and a dtd file. is there an easy way to convert these to an html page that viewers to a website can view and interact with? for example click links etc.
RSS is XML, and you can transfomrm XML into XML using XSLT. You can also convert an XML file into HTML using HTML output method in the XSLT stylesheet. You can not directly output it to XHTML, but you can indirectly do it using XML as otput method.

It is possible to aggregat RSS feeds in many ways where the most advancerd are the PHP XSL extension and PHP SOAP. You should not start there, though. You should also be aware of the EXSLT extension.

You can even use (your own) PHP functions on an XSLT stylesheet, so the sky is the limit.

Conclusion:
  1. Start learning XSLT
  2. Then continuer here XML driven site: Read here (Start with the 3.d link).
Note: You can use XPath functions in XSL(T) in addition to the native functions. As indicated above, you can use the EXSLT function module and PHP functions.

XPath 2.0 and XSLT 2.0 are simplified and has additional functionality. An important difference that you may note at once is that the root is named Document Root in XPath 1.0 while it is called Document element in XPath 2.0. You should be aware of this distinction if you are reading older documentation, since there is an important difference between the Document Root and the Document Element. In XPath 1.0 the document element is a child of the root node that can be regarded as a container for the document. The root node is an conceptual node in the node tree in XPath 1.0.

If you use one of the PHP XML parsers and processors, you should use the last version of PHP and preferrably use a hoster that are fast to upgrade to newer versions of PHP and install the most important extensions like lib2xml, libxslt and EXSLT. Evolutin on XML technologies are very fast. Some modules need to be compiled with the rest of PHP, so if you get an error, the reason may be that the API is not recompiled with PHP core.


Last advice - XML minimalism.
Use the XML family of technologies before you use external scripting, since that should be more robust. There is more that can be solve using XPath, XPointer, XInclude, XLink, XSLT and EXSLT than you thought were possible. You may work best on external XML files using XInclude, since you can control processing using xi:fallback to test for broken links and server shutdown etc.

Last edited by kgun : 12-03-2007 at 12:11 PM.
Reply With Quote
Reply

  WebProWorld > Site Design > Syndication and Social Media Discussion Forum
Tags: ,



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
A Few Questions JKomp Breakroom (General: Any Topic) 6 01-17-2006 04:55 AM
A few SEO questions MtraX Search Engine Optimization Forum 2 10-29-2005 12:20 AM
+How to (many questions) alexcl Search Engine Optimization Forum 4 12-22-2004 06:09 AM
Some Questions alixrayson Search Engine Optimization Forum 1 10-22-2004 08:34 AM


Search Engine Optimization by vBSEO 3.2.0