Home Links

It is a little about OPML (a format for creation of list RSS of channels)

It is a little about OPML


After you have created on a site some own RSS-channels (about creation RSS of channels and what is it such, on example RSS 2.0 read here http://naklon.debilarius.ru/texts/sleep/rss.htm), or want to create the list of RSS-channels of the friends and familiar at increase in the list to describe each of them in heading begins unproductively.


To do{make} the list on each page also not an output{exit}: as, first, it will be SPAM in the pure state, i.e. the information not demanded by the user, and, second, it increases the size of page. But there is a decision.


For creation of the list of channels RSS for the present{true} moment there are two formats: OCS (Open Content Syndication) and OPML (Outline Processor Markup Language). Both of them are based on language XML. The difference between these formats about same, as well as between RSS 1.0 and 2.0, therefore for formation manually the most convenient, in my opinion, will be nevertheless OPML. OPML is old enough format, and his  basic applicability was the description of the structures similar to catalogues on a disk.


Let's consider, for an example, a file describing on a site debilarius.ru channels of partners Rybca.

<? xml version = " 1.0" encoding = "windows-1251"?>


<opml version = " 1.0">


<head>




<title> Rybec and his  friends </title>


<dateCreated> Sat, 20 Dec 2003 15:00:00 GMT </dateCreated>


<dateModified> Sat, 20 Dec 2003 18:00:00 GMT </dateModified>


<ownerName> Egor Naklonyaeff </ownerName>


<ownerEmail> chyduskam@debilarius.ru </ownerEmail>




</head>


<body>




<outline type = "rss" title = " Rybka debiljarius "


   description = " something intellectually other "


   xmlUrl = " http: // debilarius.ru/rss / "


   htmlUrl = " http: // debilarius.ru / "/>


<outline type = "rss" title = " Egor Naklonjaeva's Portal "


   description = " Egor Naklonjaeva's Site and Sigizmunda Trakha, ljudovedov and


   dusheljubov, and also them edinochajatelej. The site is devoted to an inclination, it 


   To propagation and practical application. "


   xmlUrl = " http: // naklon.debilarius.ru/rss / "


   htmlUrl = " http: // naklon.debilarius.ru / "/>


<outline type = "rss" title = " Provod.kom Valery Tihonov-NeToT, personal body " d


   escription = " the Literaturo-study of local lore set of files.


   Practical interest does not represent. Contains on means


   nalogoneplatel`hhikov " xmlUrl = " http: // provod.com/rss.xml "


   htmlUrl = " http: // www.provod.com / "/>


</body>


</opml>



So, we shall disassemble under the order. The first line speaks us about that, what is it XML versions 1.0, and that for analysis of it  it is necessary to use the coding [47] windows-1251. The second line opens a tag opml with obligatory attribute version. The given element will consist of two obligatory elements: head and body. The element head can be empty, and can contain the below-mentioned elements, describing given document:


* <title> - the general{common} heading of the document


* <dateCreated> - date of creation of the document


* <dateModified> - date of last change of the document


* <ownerName> - a line describing the owner of the given document


* <ownerEmail> - an e-mail address of the owner.


Other elements mentioned in the specification as that <expansionState>, <vertScrollState>, <windowTop>, <windowLeft>, <windowBottom> and <windowRight> for our purposes are not necessary. More in detail about them, see specification OPML (http://opml.scripting.com/spec)


Pay attention to date, she should be necessarily in standard RFC 822, i.e. with the instruction{indication} of day of week and time zone. For Moscow and Saint Petersburg, time zone +0300. Thus: Sat, 20 Dec 2003 15:00:00 GMT - the same, that Sat, 20 Dec 2003 18:00:00 +0300.


It is allowable both spellings.


As if to an element body with it  it is more complex . The detailed specification on him  is not present, therefore I shall describe elements from existing practice of his  application in the Internet. The given element will consist of any quantity{amount} of elements <outline>. Investments in the given element of other elements though are supposed by the standard at the description of documents of such type, it is not supported by the majority agregatorov. Each element contains the following desirable attributes:


* type - type of an element, we write "rss".


* title - in this case, the name of the RSS-channel. Corresponds{meets} to an element <title> an element <channel> for RSS 2.0


* description - the brief description of the channel. Corresponds{meets} to an element <description> an element <channel> for RSS 2.0


* xmlUrl - the link to the channel as RSS


* htmlUrl-ssyka on HTML-page of the given channel. Corresponds{meets} to an element <link> an element <channel> for RSS 2.0


Let's save the received result as a file with expansion .opml and we shall pass to adjustment of the server. It is necessary for server to inform, that there is such expansion. It is done{made} at Apache server, for example, by simple addition of a line:


AddType text/xml opml


In fail .htaccess. If all this for you a double-dutch simply save a file with expansion .xml, such as myfriends.xml and forget, that I just spoke.


After we have saved a file and have laid out it  on the server, it is necessary to inform come on a site, that at us is opml. For page in format HTML it is done{made} by the following element of section <head>:

<link rel = "subscriptions" type = "text/x-opml" title = "OPML" href = " http: // naklon.debilarius.ru/debilarius.opml ">



Replace http://naklon.debilarius.ru/debilarius.opml with the link and enjoy result. For such agregatorov, as for example NewzCrawler (http://www.newzcrawler.com/) more than it is enough of it.


For less advanced, it is possible to put the given link to the button or to make her  in a text kind, but it already absolutely other history...



Home Page
Compression of pages on PHP
Functions of a paginal conclusion in PHP
PHP a script for automatic definition of the coding of the text:
XML Sapiens - magic of revival of sites
XML: opportunities and prospects
The data, their performance and forms of the user interface in XML
It is a little about OPML
Protection of mail
Importation of the information from an another's site on the site in the design
The forum working with database MySQL
The main page of a forum
Paginal conclusion from tables MSSQL with help PHP
Small cunnings
We print rationally or one more way of protection of the information
Site from within
The link - business not artful
Ideology HTML
Effect bukvicy
Ways of storage of the dynamic data