Skip to content.
|Networking government in New Zealand.
 

A complete example of RSS

This section outlines a complete example of RDF Site Summary 1.0 (RSS) as specified in this document. It uses only the required elements, ignoring all optional elements for the sake of clarity and simplicity.

7.1 Complete example

This example is constructed from the examples used in this document previously.

<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF
 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
 xmlns="http://purl.org/rss/1.0/"
 xmlns:nzgls="http://www.nzgls.govt.nz/standard/"
>
<channel rdf:about="http://www.ssc.govt.nz/xml/news.rdf">
 <title>State Services Commission News</title>
 <link>http://www.ssc.govt.nz/news/</link>
 <description>The State Services Commission News</description>
 <items>
   <rdf:Seq>
     <rdf:li rdf:resource="http://www.ssc.govt.nz/disability-mentoring-day" />
     <rdf:li rdf:resource="http://www.ssc.govt.nz/appt-ce-natlib-oct02" />
   </rdf:Seq>
 </items>
</channel>
<item rdf:about="http://www.ssc.govt.nz/disability-mentoring-day">
  <title>Applications invited for Disability Mentoring Day</title>
  <link>http://www.ssc.govt.nz/disability-mentoring-day</link>
  <description>The State Services Commission, through its Mainstream Employment Programme, is 
pleased to host the first New Zealand Disability Mentoring Day: Career Development for the 21
Century. Disability Mentoring Day will be celebrated in Wellington on Tuesday 12 November
2002.</description>
  <nzgls:date.valid>2002-10-07</nzgls:date.valid>
  <nzgls:identifier>20021007-0015-SSC</nzgls:identifier>  
  <nzgls:type.agency>State Services Commission</nzgls:type.agency>
</item>
<item rdf:about="http://www.ssc.govt.nz/appt-ce-natlib-oct02">
  <title>Appointment of National Librarian announced</title>
  <link>http://www.ssc.govt.nz/appt-ce-natlib-oct02</link>
  <description>The State Services Commissioner, Michael Wintringham, announced today the appointment 
of Penny Carnaby as Chief Executive of National Library of New Zealand and National
Librarian...</description>
  <nzgls:date.valid>2002-10-09</nzgls:date.valid>
  <nzgls:identifier>20021009-0016-SSC</nzgls:identifier>
  <nzgls:type.agency>State Services Commission</nzgls:type.agency>
</item>
</rdf:RDF>

7.2 Changing the example to suit your needs

You can adapt the above example to your own situation by following these simple steps.

In the <channel> section of the above example:

  • Change the <title> element to the name of your agency.

  • Change the <link> element to the URL of your agency news, or failing that, the URL of your agency's website.

  • Change the <description> element to something appropriate for your agency.

In the <rdf:Seq> section of the above example:

  • Ensure there is an <rdf:li> element for each news <item> in the file. This URL in this element should match the URL with the <item> itself.

Each news <item> should contain:

  • A <title>.

  • A <link> (URL) where the news article can be found.

  • A short <description> of the news item. This description should be pure text only and contain no HTML or XML mark-up.

  • An <nzgls:date> for when this <item> should be published.

  • An <nzgls:identifier> that is unique for each <item>.

  • Your agency name in the <nzgls:type.agency> element.


[ Previous ]