News archiving

Anderson Lizardo andersonlizardo at
Fri Aug 22 20:05:07 PDT 2003

Jeremy Utley wrote:
> The archiving aspect is easy enough.  ALL news submissions will be in
> this XML file.  The default is last 5 entries - simply pull the last
> 5 entries from the XML file.  Want 20?  Pull 20 entries.  Quite
> simple, no backend stuff necessary, except some language to parse it.

I will resume your suggestion, and you correct me if I'm wrong 

- create a "newsml" containing news items[1];
- write a Perl script that parses this file, outputs a XHTML file 
containing the last 5 news and archives the rest.

This method has at least one issue: the field containing the news item 
content (<description>...</description>, in case of RSS), will have to 
be all entity-encoded. Eg: to output

<p>Paragraph 1</p>
<p>Paragraph 2</p>

the news writer will have to write

<p>Paragraph 1</p>
<p>Paragraph 2</p>

This is not a problem if you are using a XML editor.

[1] This could be in RSS format; see
Anderson Lizardo

Desafio AntiZona: participe do jogo de perguntas e respostas que vai
dar um Renault Clio, computadores, câmeras digitais, videogames e muito

More information about the website mailing list