XML, DTD, RSS and other 3 letter combos...
This week we're going to conquer those pesky 3 letter acronyms: XML, DTD and RSS.
XML
Like html, xml uses tags to delimit data. Unlike html, it's very unforgiving of syntax errors - mistyping the tag name, mixing upper and lower case, inproperly nesting tags and leaving out closing tags are all sudden-death events for an XML document.
For the important bits on XML, please read through the following W3Schools pages:
Introduction to XML
What is XML, and how does it differ from HTML?
How XML can be used
Some of the different ways XML can be used.
XML Syntax
The strict but very simple syntax rules of XML.
XML Elements
XML Elements, relationships, content and naming rules.
XML Attributes
How XML attributes can be used to describe elements or provide additional information about elements.
XML Validation
The difference between a Well Formed and a Valid XML document and how a DTD is used to define the XML document.
which brings us to our next acronym:
DTDs
So that other computers can understand what you're talking about, you need to give them some hints. Theat's where the DTD comes into the picture. A Document Type Definition dictates what the legal building blocks are for your XML document.
Once again, let's check out W3Schools for a DTD Tutorial
The good news:
We don't need to know how to build an XML document from scratch (yet).
The bad:
We do need to know how to create valid XML documents that conform to DTDs created by other people.
Here's one to practice on:
Google sitemaps are XML documents that describe websites so that the google search engine can crawl through them and include them in their search results.
Now, google will find pages by itself, but by using a sitemap you can speed up the process, and guide the robot to your best pages first. For your assignment: create a sitemap of your Bathurst TAFE web pages that conform to the Google sitemap specification - validate the sitemap and print the results, and submit them to me along with a printout of the sitemap itself.
Extra but interesing:
To add your own attributes to the XHTML specification you'll need to know how to extend existing DTDs.
RSS
One of the high profile uses for XML is RSS.
Really Simple Syndication has been used for years by web sites to broadcast the availability of fresh content; listing new pages in an XML file which special programs called aggregators can pick up and process, and tell real people about fresh content that they can read.
Like everything on the web, RSS has evolved. The important milestones are RSS 0.91, RSS 2 and the Google supported challenger: Atom. Read all about them on the Wikipedia
Coming up (next week?): we'll be looking at how to create a form and some script that will allow you to generate RSS 0.91 files for new pages as they're added to your TAFE website.
Thanks to kosmar for the
Web2.0 - extended mindcloudmap
No comments:
Post a Comment