[Cascavel-pm] Re: [RFC] Database x XML
Robin Berjon
robin.berjon em expway.fr
Sábado Dezembro 20 12:15:23 CST 2003
Luis Campos de Carvalho wrote:
> Hy dear London Mongers.
> I'm (re) implementing the company web application menus and would like
> to read comments, impressions and suggestions from you about the best
> way to store informations (demi-static, rarely changed) needed to
> generate the user menus. You think its better to store this information
> on a database, and recall them via DBI? Or would be better to store
> these informations into a XML file, and recall them via XML::Parser?
>
> My menus don't exceed 50 items at all.
A database will be totally useless for this. XML has several advantages,
some of which being much simpler edition and extensibility (should you
need it down the line).
There are many ways to process XML, however XML::Parser is not one of
them. Don't use it, unless you really really have to. If you need stream
parsing use XML::SAX, if you need tree parsing use XML::LibXML, if all
you need is to transform those menus into something else use
XML::LibXSLT (and then switch your site to AxKit ;).
--
Robin Berjon
Mais detalhes sobre a lista de discussão Cascavel-pm