[thelist] XML possible solution

Dan Craciun dc.thelist at gmail.com
Tue Mar 6 04:46:42 CST 2007


Hi all,

The products section of a site looks like this:
- top categories as links (menu) on the left
- for every category a short text and the subcategories (to be displayed 
on the content section)
- for every "leaf" or final subcategory, a short text and links to 
specific pages on manufacturer's website.

You'll find a sample here: http://qurl.net/1o7

If I do the pages manually, there will be some 40+ pages and if they 
change fast enough, the maintenance will resemble the production of a 
Matrix scene :)

This looks like the perfect candidate to store data as an xml file. This 
is the schema I've created so far:

<products>
<product>
    <id></id>
    <parent></parent>
    <title></title>
    <text></text>
    <picture>
        <path></path>
        <width></width>
        <height></height>
        <alt></alt>
        <link></link>
    </picture>
</product>
</products>

A sample semi-filled XML file is here: http://qurl.net/1o8

And here come the questions:
- am I reinventing the wheel here? This is, essentially, a content 
management problem
- do you have pro/cons with this approach?
- how complex do you think the php display class will be (this will be 
my first practical implementation of XML in php).

Thanks

Dan Craciun



More information about the thelist mailing list